!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(a){var e,t,n,i;function r(e,t){var n,i,r,o=e.nodeName.toLowerCase();return"area"===o?(i=(n=e.parentNode).name,!(!e.href||!i||"map"!==n.nodeName.toLowerCase())&&(!!(r=a("img[usemap='#"+i+"']")[0])&&s(r))):(/^(input|select|textarea|button|object)$/.test(o)?!e.disabled:"a"===o&&e.href||t)&&s(e)}function s(e){return a.expr.filters.visible(e)&&!a(e).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(e){var t=this.css("position"),n="absolute"===t,i=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=a(this);return(!n||"static"!==e.css("position"))&&i.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&r.length?r:a(this[0].ownerDocument||document)},uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(t){return function(e){return!!a.data(e,t)}}):function(e,t,n){return!!a.data(e,n[3])},focusable:function(e){return r(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(e){var t=a.attr(e,"tabindex"),n=isNaN(t);return(n||0<=t)&&r(e,!n)}}),a("").outerWidth(1).jquery||a.each(["Width","Height"],function(e,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function s(e,t,n,i){return a.each(r,function(){t-=parseFloat(a.css(e,"padding"+this))||0,n&&(t-=parseFloat(a.css(e,"border"+this+"Width"))||0),i&&(t-=parseFloat(a.css(e,"margin"+this))||0)}),t}a.fn["inner"+n]=function(e){return void 0===e?o["inner"+n].call(this):this.each(function(){a(this).css(i,s(this,e)+"px")})},a.fn["outer"+n]=function(e,t){return"number"!=typeof e?o["outer"+n].call(this,e):this.each(function(){a(this).css(i,s(this,e,!0,t)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),a("").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=(t=a.fn.removeData,function(e){return arguments.length?t.call(this,a.camelCase(e)):t.call(this)})),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:(i=a.fn.focus,function(t,n){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){a(e).focus(),n&&n.call(e)},t)}):i.apply(this,arguments)}),disableSelection:(n="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(n+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var t,n,i=a(this[0]);i.length&&i[0]!==document;){if(("absolute"===(t=i.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(i.css("zIndex"),10),!isNaN(n)&&0!==n))return n;i=i.parent()}return 0}}),a.ui.plugin={add:function(e,t,n){var i,r=a.ui[e].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([t,n[i]])},call:function(e,t,n,i){var r,o=e.plugins[t];if(o&&(i||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(r=0;r"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){b(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",n)}function n(){b.datepicker._isDisabledDatepicker(r.inline?r.dpDiv.parent()[0]:r.input[0])||(b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).addClass("ui-datepicker-next-hover"))}function h(e,t){for(var a in b.extend(e,t),t)null==t[a]&&(e[a]=t[a]);return e}return b.extend(b.ui,{datepicker:{version:"1.11.4"}}),b.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return h(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i,s;i="div"===(a=e.nodeName.toLowerCase())||"span"===a,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(s=this._newInst(b(e),i)).settings=b.extend({},t||{}),"input"===a?this._connectDatepicker(e,s):i&&this._inlineDatepicker(e,s)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(b("
")):this.dpDiv}},_connectDatepicker:function(e,t){var a=b(e);t.append=b([]),t.trigger=b([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),b.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i,s,r=this._get(t,"appendText"),n=this._get(t,"isRTL");t.append&&t.append.remove(),r&&(t.append=b(""+r+""),e[n?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(a=this._get(t,"showOn"))&&"both"!==a||e.focus(this._showDatepicker),"button"!==a&&"both"!==a||(i=this._get(t,"buttonText"),s=this._get(t,"buttonImage"),t.trigger=b(this._get(t,"buttonImageOnly")?b("").addClass(this._triggerClass).attr({src:s,alt:i,title:i}):b("").addClass(this._triggerClass).html(s?b("").attr({src:s,alt:i,title:i}):i)),e[n?"before":"after"](t.trigger),t.trigger.click(function(){return b.datepicker._datepickerShowing&&b.datepicker._lastInput===e[0]?b.datepicker._hideDatepicker():(b.datepicker._datepickerShowing&&b.datepicker._lastInput!==e[0]&&b.datepicker._hideDatepicker(),b.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,a,i,s,r=new Date(2009,11,20),n=this._get(e,"dateFormat");n.match(/[DM]/)&&(t=function(e){for(s=i=a=0;sa&&(a=e[s].length,i=s);return i},r.setMonth(t(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(e,t){var a=b(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),b.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var r,n,d,c,o,l=this._dialogInst;return l||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=b(""),this._dialogInput.keydown(this._doKeyDown),b("body").append(this._dialogInput),(l=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},b.data(this._dialogInput[0],"datepicker",l)),h(l.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(l,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,d=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,o=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+c,d/2-150+o]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),l.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),b.blockUI&&b.blockUI(this.dpDiv),b.data(this._dialogInput[0],"datepicker",l),this},_destroyDatepicker:function(e){var t,a=b(e),i=b.data(e,"datepicker");a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),b.removeData(e,"datepicker"),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty(),r===i&&(r=null))},_enableDatepicker:function(t){var e,a,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a,i=b(t),s=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((a=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=b.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;td&&ic&&st;)--G<0&&(G=11,ee--);for(e.drawMonth=G,e.drawYear=ee,a=this._get(e,"prevText"),a=B?this.formatDate(a,this._daylightSavingAdjust(new Date(ee,G-q,1)),this._getFormatConfig(e)):a,i=this._canAdjustMonth(e,-1,ee,G)?"
"+a+"":z?"":""+a+"",s=this._get(e,"nextText"),s=B?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,G+q,1)),this._getFormatConfig(e)):s,r=this._canAdjustMonth(e,1,ee,G)?""+s+"":z?"":""+s+"",n=this._get(e,"currentText"),d=this._get(e,"gotoCurrent")&&e.currentDay?X:H,n=B?this.formatDate(n,d,this._getFormatConfig(e)):n,c=e.inline?"":"",o=U?"
"+(P?c:"")+(this._isInRange(e,d)?"":"")+(P?"":c)+"
":"",l=parseInt(this._get(e,"firstDay"),10),l=isNaN(l)?0:l,h=this._get(e,"showWeek"),u=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),_=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),k=this._get(e,"showOtherMonths"),D=this._get(e,"selectOtherMonths"),m=this._getDefaultDate(e),y="",M=0;M"+(/all|left/.test(I)&&0===M?P?r:i:"")+(/all|right/.test(I)&&0===M?P?i:r:"")+this._generateMonthYearHeader(e,G,ee,Z,$,0",Y=h?"":"",v=0;v<7;v++)Y+="";for(x+=Y+"",N=this._getDaysInMonth(ee,G),ee===e.selectedYear&&G===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,N)),F=(this._getFirstDayOfMonth(ee,G)-l+7)%7,T=Math.ceil((F+N)/7),A=Q&&this.maxRows>T?this.maxRows:T,this.maxRows=A,K=this._daylightSavingAdjust(new Date(ee,G,1-F)),j=0;j",O=h?"":"",v=0;v<7;v++)R=f?f.apply(e.input?e.input[0]:null,[K]):[!0,""],W=(L=K.getMonth()!==G)&&!D||!R[0]||Z&&K"+(L&&!k?" ":W?""+K.getDate()+"":""+K.getDate()+"")+"",K.setDate(K.getDate()+1),K=this._daylightSavingAdjust(K);x+=O+""}11<++G&&(G=0,ee++),b+=x+="
"+this._get(e,"weekHeader")+""+p[S]+"
"+this._get(e,"calculateWeek")(K)+"
"+(Q?""+(0":""):"")}y+=b}return y+=o,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,a,i,s,r,n,d){var c,o,l,h,u,p,g,_,f=this._get(e,"changeMonth"),k=this._get(e,"changeYear"),D=this._get(e,"showMonthAfterYear"),m="
",y="";if(r||!f)y+=""+n[t]+"";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,y+=""}if(D||(m+=y+(!r&&f&&k?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!k)m+=""+a+"";else{for(h=this._get(e,"yearRange").split(":"),u=(new Date).getFullYear(),g=(p=function(e){var t=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?u+parseInt(e,10):parseInt(e,10);return isNaN(t)?u:t})(h[0]),_=Math.max(g,p(h[1]||"")),g=i?Math.max(g,i.getFullYear()):g,_=s?Math.min(_,s.getFullYear()):_,e.yearshtml+="",m+=e.yearshtml,e.yearshtml=null}return m+=this._get(e,"yearSuffix"),D&&(m+=(!r&&f&&k?"":" ")+y),m+="
"},_adjustInstDate:function(e,t,a){var i=e.drawYear+("Y"===a?t:0),s=e.drawMonth+("M"===a?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),n=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,r)));e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),s=a&&t=s.getTime())&&(!r||t.getTime()<=r.getTime())&&(!n||t.getFullYear()>=n)&&(!d||t.getFullYear()<=d)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),b.fn.datepicker=function(e){if(!this.length)return this;b.datepicker.initialized||(b(document).mousedown(b.datepicker._checkExternalClick),b.datepicker.initialized=!0),0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this].concat(t)):b.datepicker._attachDatepicker(this,e)}):b.datepicker["_"+e+"Datepicker"].apply(b.datepicker,[this[0]].concat(t))},b.datepicker=new e,b.datepicker.initialized=!1,b.datepicker.uuid=(new Date).getTime(),b.datepicker.version="1.11.4",b.datepicker}); !function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on("mouseleave."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}}else if(t.options.trigger=="click"){t.$elProxy.on("click."+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!="shown"&&e.Status!="appearing"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger=="click"||e.options.trigger=="hover"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(".tooltipstered").not(r.$el).each(function(t,n){var r=e(n),i=r.data("tooltipster-ns");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option("autoClose");if(i!=="hidden"&&i!=="disappearing"&&s){n.hide()}})})}var i=function(){r.Status="shown";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!=="hidden"){var s=0;if(r.Status==="disappearing"){r.Status="appearing";if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+r.options.animation+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status==="shown"){i()}}else{r.Status="appearing";var s=r.options.speed;r.bodyOverflowX=e("body").css("overflow-x");e("body").css("overflow-x","hidden");var o="tooltipster-"+r.options.animation,a="-webkit-transition-duration: "+r.options.speed+"ms; -webkit-animation-duration: "+r.options.speed+"ms; -moz-transition-duration: "+r.options.speed+"ms; -moz-animation-duration: "+r.options.speed+"ms; -o-transition-duration: "+r.options.speed+"ms; -o-animation-duration: "+r.options.speed+"ms; -ms-transition-duration: "+r.options.speed+"ms; -ms-animation-duration: "+r.options.speed+"ms; transition-duration: "+r.options.speed+"ms; animation-duration: "+r.options.speed+"ms;",f=r.options.minWidth?"min-width:"+Math.round(r.options.minWidth)+"px;":"",c=r.options.maxWidth?"max-width:"+Math.round(r.options.maxWidth)+"px;":"",h=r.options.interactive?"pointer-events: auto;":"";r.$tooltip=e('
');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo("body");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css("display","none").fadeIn(r.options.speed,i)}r._interval_set();e(t).on("scroll."+r.namespace+" resize."+r.namespace,function(){r.reposition()});if(r.options.autoClose){e("body").off("."+r.namespace);if(r.options.trigger=="hover"){if(u){setTimeout(function(){e("body").on("touchstart."+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on("touchstart."+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on("mouseleave."+r.namespace+"-autoClose",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on("mouseenter."+r.namespace+"-autoClose",function(){clearTimeout(p)})}else{r.$elProxy.on("mouseleave."+r.namespace+"-autoClose",function(){r.hide()})}if(r.options.hideOnClick){r.$elProxy.on("click."+r.namespace+"-autoClose",function(){r.hide()})}}else if(r.options.trigger=="click"){setTimeout(function(){e("body").on("click."+r.namespace+" touchstart."+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on("click."+r.namespace+" touchstart."+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e("body").find(t.$el).length===0||e("body").find(t.$elProxy).length===0||t.Status=="hidden"||e("body").find(t.$tooltip).length===0){if(t.Status=="shown"||t.Status=="appearing")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css("position")==="fixed"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition();t.options.positionTrackerCallback.call(t,t.$el)}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e==="object"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");if(typeof e.Content==="string"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!=="hidden"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!="hidden"){t.$tooltip.removeClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!=="hidden"){t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!="hidden"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status=="shown"||r.Status=="appearing"){r.Status="disappearing";var s=function(){r.Status="hidden";if(typeof r.Content=="object"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off("."+r.namespace);e("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);e("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status=="hidden"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e==="undefined"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e("body").find(n.$tooltip).length!==0){n.$tooltip.css("width","");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is("area")){var f=n.$elProxy.attr("shape"),l=n.$elProxy.parent().attr("name"),c=e('img[usemap="#'+l+'"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr("coords")!==undefined?n.$elProxy.attr("coords").split(","):undefined;if(f=="circle"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f=="rect"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f=="poly"){var w=[],E=[],S=0,x=0,T=0,N=0,C="even";for(var k=0;kT){T=L;if(k===0){S=T}}if(LN){N=L;if(k==1){x=N}}if(Li){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf("top")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf("bottom")>-1){P=n;M=s.offset.top-a-_-12}}if(P=="top"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B("bottom","top")}if(P=="top-left"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B("bottom-left","top-left")}if(P=="top-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B("bottom-right","top-right")}if(P=="bottom"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B("top","bottom")}if(P=="bottom-left"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B("top-left","bottom-left")}if(P=="bottom-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B("top-right","bottom-right")}if(P=="left"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=o+A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r="left"}}if(P=="right"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=i-A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r="right"}}if(n.options.arrow){var R="tooltipster-arrow-"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css("background-color")}else{var U=n.options.arrowColor}if(!r){r=""}else if(r=="left"){R="tooltipster-arrow-right";r=""}else if(r=="right"){R="tooltipster-arrow-left";r=""}else{r="left:"+Math.round(r)+"px;"}if(P=="top"||P=="top-left"||P=="top-right"){var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}else if(P=="bottom"||P=="bottom-left"||P=="bottom-right"){var z=parseFloat(n.$tooltip.css("border-top-width")),W=n.$tooltip.css("border-top-color")}else if(P=="left"){var z=parseFloat(n.$tooltip.css("border-right-width")),W=n.$tooltip.css("border-right-color")}else if(P=="right"){var z=parseFloat(n.$tooltip.css("border-left-width")),W=n.$tooltip.css("border-left-color")}else{var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}if(z>1){z++}var X="";if(z!==0){var V="",J="border-color: "+W+";";if(R.indexOf("bottom")!==-1){V="margin-top: -"+Math.round(z)+"px;"}else if(R.indexOf("top")!==-1){V="margin-bottom: -"+Math.round(z)+"px;"}else if(R.indexOf("left")!==-1){V="margin-right: -"+Math.round(z)+"px;"}else if(R.indexOf("right")!==-1){V="margin-left: -"+Math.round(z)+"px;"}X=''}n.$tooltip.find(".tooltipster-arrow").remove();var K='
'+X+'
';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+"px",left:Math.round(A)+"px"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0]){t.$elProxy.remove()}t.$el.removeData(t.namespace).off("."+t.namespace);var n=t.$el.data("tooltipster-ns");if(n.length===1){var r=null;if(t.options.restoration==="previous"){r=t.$el.data("tooltipster-initialTitle")}else if(t.options.restoration==="current"){r=typeof t.Content==="string"?t.Content:e("
").append(t.Content).html()}if(r){t.$el.attr("title",r)}t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data("tooltipster-ns",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t=="undefined")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]==="string"){var n=true;switch(t[0]){case"setDefaults":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]==="string"){var r="#*$~&";this.each(function(){var n=e(this).data("tooltipster-ns"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]==="function"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster("'+t[0]+'")')}if(s!==i){r=s;return false}}else{throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element')}});return r!=="#*$~&"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!=="undefined",a=u&&t[0].multiple||!u&&i.multiple,f=t[0]&&typeof t[0].debug!=="undefined",l=f&&t[0].debug||!f&&i.debug;this.each(function(){var n=false,r=e(this).data("tooltipster-ns"),i=null;if(!r){n=true}else if(a){n=true}else if(l){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data("tooltipster-ns",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!("ontouchstart"in t);var a=false;e("body").one("mousemove",function(){a=true})})(jQuery,window,document); var booked_load_calendar_date_booking_options, booked_appt_form_options, bookedNewAppointment; ;(function($, window, document, undefined){ var $win=$(window); $.fn.spin.presets.booked={ lines: 10, length: 7, width: 5, radius: 11, corners: 1, rotate: 0, direction: 1, color: '#555', speed: 1, trail: 60, shadow: false, hwaccel: false, className: 'booked-spinner', zIndex: 2e9, top: '50%', left: '50%' } $.fn.spin.presets.booked_top={ lines: 11, length: 10, width: 6, radius: 15, corners: 1, rotate: 0, scale: 0.5, direction: 1, color: '#aaaaaa', speed: 1, trail: 60, shadow: false, hwaccel: false, className: 'booked-spinner booked-spinner-top', zIndex: 2e9, top: '15px', left: '50%' } $.fn.spin.presets.booked_white={ lines: 13, length: 11, width: 5, radius: 18, scale: 1, corners: 1, rotate: 0, direction: 1, color: '#fff', speed: 1, trail: 60, shadow: false, hwaccel: false, className: 'booked-spinner booked-white', zIndex: 2e9, top: '50%', left: '50%' } $win.on('resize', function(){ adjust_calendar_boxes(); resize_booked_modal(); }); $win.on('load', function(){ BookedTabs.Init(); var ajaxRequests=[]; adjust_calendar_boxes(); $('.booked-calendar-wrap').each(function(){ var thisCalendar=$(this); var calendar_month=thisCalendar.find('table.booked-calendar').attr('data-calendar-date'); thisCalendar.attr('data-default',calendar_month); init_tooltips(thisCalendar); }); $('.booked-list-view').each(function(){ var thisList=$(this); var list_date=thisList.find('.booked-appt-list').attr('data-list-date'); thisList.attr('data-default',list_date); }); bookedRemoveEmptyTRs(); init_appt_list_date_picker(); $('.booked_calendar_chooser').change(function(e){ e.preventDefault(); var $selector=$(this), thisIsCalendar=$selector.parents('.booked-calendarSwitcher').hasClass('calendar'); if(!thisIsCalendar){ var thisCalendarWrap=$selector.parents('.booked-calendar-shortcode-wrap').find('.booked-list-view'), thisDefaultDate=thisCalendarWrap.attr('data-default'), thisIsCalendar=$selector.parents('.booked-calendarSwitcher').hasClass('calendar'); if(typeof thisDefaultDate=='undefined'){ thisDefaultDate=false; } thisCalendarWrap.addClass('booked-loading'); var args={ 'action':'booked_appointment_list_date', 'date':thisDefaultDate, 'calendar_id':$selector.val() }; $(document).trigger("booked-before-loading-appointment-list-booking-options"); thisCalendarWrap.spin('booked_top'); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: args, success: function(html){ thisCalendarWrap.html(html); init_appt_list_date_picker(); setTimeout(function(){ thisCalendarWrap.removeClass('booked-loading'); },1); }}); }else{ var thisCalendarWrap=$selector.parents('.booked-calendar-shortcode-wrap').find('.booked-calendar-wrap'), thisDefaultDate=thisCalendarWrap.attr('data-default'); if(typeof thisDefaultDate=='undefined'){ thisDefaultDate=false; } var args={ 'action':'booked_calendar_month', 'gotoMonth':thisDefaultDate, 'calendar_id':$selector.val() }; savingState(true,thisCalendarWrap); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: args, success: function(html){ thisCalendarWrap.html(html); adjust_calendar_boxes(); bookedRemoveEmptyTRs(); init_tooltips(thisCalendarWrap); $(window).trigger('booked-load-calendar', args, $selector); }}); } return false; }); $('body').on('click', '.booked-calendar-wrap .page-right, .booked-calendar-wrap .page-left, .booked-calendar-wrap .monthName a', function(e){ e.preventDefault(); var $button=$(this), gotoMonth=$button.attr('data-goto'), thisCalendarWrap=$button.parents('.booked-calendar-wrap'), thisCalendarDefault=thisCalendarWrap.attr('data-default'), calendar_id=$button.parents('table.booked-calendar').attr('data-calendar-id'); if(typeof thisCalendarDefault=='undefined'){ thisCalendarDefault=false; } var args={ 'action':'booked_calendar_month', 'gotoMonth':gotoMonth, 'calendar_id':calendar_id, 'force_default':thisCalendarDefault }; savingState(true,thisCalendarWrap); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: args, success: function(html){ thisCalendarWrap.html(html); adjust_calendar_boxes(); bookedRemoveEmptyTRs(); init_tooltips(thisCalendarWrap); $(window).trigger('booked-load-calendar', args, $button); }}); return false; }); $('body').on('click', '.booked-calendar-wrap tr.week td', function(e){ e.preventDefault(); var $thisDate=$(this), booked_calendar_table=$thisDate.parents('table.booked-calendar'), $thisRow=$thisDate.parent(), date=$thisDate.attr('data-date'), calendar_id=booked_calendar_table.attr('data-calendar-id'), colspanSetting=$thisRow.find('td').length; if(!calendar_id){ calendar_id=0; } if($thisDate.hasClass('blur')||$thisDate.hasClass('booked')&&!booked_js_vars.publicAppointments||$thisDate.hasClass('prev-date')){ }else if($thisDate.hasClass('active')){ $thisDate.removeClass('active'); $('tr.entryBlock').remove(); var calendarHeight=booked_calendar_table.height(); booked_calendar_table.parent().height(calendarHeight); }else{ $('tr.week td').removeClass('active'); $thisDate.addClass('active'); $('tr.entryBlock').remove(); $thisRow.after(''); $('tr.entryBlock').find('td').spin('booked'); booked_load_calendar_date_booking_options={'action':'booked_calendar_date','date':date,'calendar_id':calendar_id}; $(document).trigger("booked-before-loading-calendar-booking-options"); var calendarHeight=booked_calendar_table.height(); booked_calendar_table.parent().height(calendarHeight); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_load_calendar_date_booking_options, success: function(html){ $('tr.entryBlock').find('td').html(html); $('tr.entryBlock').removeClass('booked-loading'); $('tr.entryBlock').find('.booked-appt-list').fadeIn(300); $('tr.entryBlock').find('.booked-appt-list').addClass('shown'); adjust_calendar_boxes(); }}); } return; }); $('body').on('click', '.booked-list-view .booked-list-view-date-prev, .booked-list-view .booked-list-view-date-next', function(e){ e.preventDefault(); var $thisLink=$(this), date=$thisLink.attr('data-date'), thisList=$thisLink.parents('.booked-list-view'), defaultDate=thisList.attr('data-default'), calendar_id=$thisLink.parents('.booked-list-view-nav').attr('data-calendar-id'); if(typeof defaultDate=='undefined'){ defaultDate=false; } if(!calendar_id){ calendar_id=0; } thisList.addClass('booked-loading'); var booked_load_list_view_date_booking_options={ 'action':'booked_appointment_list_date', 'date':date, 'calendar_id':calendar_id, 'force_default':defaultDate }; $(document).trigger("booked-before-loading-appointment-list-booking-options"); thisList.spin('booked_top'); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_load_list_view_date_booking_options, success: function(html){ thisList.html(html); init_appt_list_date_picker(); setTimeout(function(){ thisList.removeClass('booked-loading'); },1); }}); return false; }); bookedNewAppointment=function(e){ e.preventDefault(); var $button=$(this), title=$button.attr('data-title'), timeslot=$button.attr('data-timeslot'), date=$button.attr('data-date'), calendar_id=$button.attr('data-calendar-id'), $thisTimeslot=$button.parents('.timeslot'), is_list_view=$button.parents('.booked-calendar-wrap').hasClass('booked-list-view'); if(typeof is_list_view!='undefined'&&is_list_view){ var new_calendar_id=$button.parents('.booked-list-view').find('.booked-list-view-nav').attr('data-calendar-id'); }else{ var new_calendar_id=$button.parents('table.booked-calendar').attr('data-calendar-id'); } calendar_id=new_calendar_id ? new_calendar_id:calendar_id; booked_appt_form_options={'action':'booked_new_appointment_form','date':date,'timeslot':timeslot,'calendar_id':calendar_id,'title':title}; $(document).trigger("booked-before-loading-booking-form"); create_booked_modal(); setTimeout(function(){ $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_appt_form_options, success: function(html){ $('.bm-window').html(html); var bookedModal=$('.booked-modal'); var bmWindow=bookedModal.find('.bm-window'); bmWindow.css({'visibility':'hidden'}); bookedModal.removeClass('bm-loading'); $(document).trigger("booked-on-new-app"); resize_booked_modal(); bmWindow.hide(); $('.booked-modal .bm-overlay').find('.booked-spinner').remove(); setTimeout(function(){ bmWindow.css({'visibility':'visible'}); bmWindow.show(); },50); }}); },100); return false; } $('body').on('click', '.booked-calendar-wrap button.new-appt', bookedNewAppointment); var profileTabs=$('.booked-tabs'); if(!profileTabs.find('li.active').length){ profileTabs.find('li:first-child').addClass("active"); } if(profileTabs.length){ $('.booked-tab-content').hide(); var activeTab=profileTabs.find('.active > a').attr('href'); activeTab=activeTab.split('#'); activeTab=activeTab[1]; $('#profile-'+activeTab).show(); profileTabs.find('li > a').on('click', function(e){ e.preventDefault(); $('.booked-tab-content').hide(); profileTabs.find('li').removeClass('active'); $(this).parent().addClass('active'); var activeTab=$(this).attr('href'); activeTab=activeTab.split('#'); activeTab=activeTab[1]; $('#profile-'+activeTab).show(); return false; }); } $('body').on('click', '.booked-profile-appt-list .booked-show-cf', function(e){ e.preventDefault(); var hiddenBlock=$(this).parent().find('.cf-meta-values-hidden'); if(hiddenBlock.is(':visible')){ hiddenBlock.hide(); $(this).removeClass('booked-cf-active'); }else{ hiddenBlock.show(); $(this).addClass('booked-cf-active'); } return false; }); if($('#loginform').length){ $('#loginform input[type="submit"]').on('click',function(e){ if($('#loginform input[name="log"]').val()&&$('#loginform input[name="pwd"]').val()){ $('#loginform .booked-custom-error').hide(); }else{ if($('#loginform').parents('.booked-form-wrap').length){ e.preventDefault(); $('#loginform').parents('.booked-form-wrap').find('.booked-custom-error').fadeOut(200).fadeIn(200); }} }); } if($('#profile-forgot').length){ $('#profile-forgot input[type="submit"]').on('click',function(e){ if($('#profile-forgot input[name="user_login"]').val()){ $('#profile-forgot .booked-custom-error').hide(); }else{ e.preventDefault(); $('#profile-forgot').find('.booked-custom-error').fadeOut(200).fadeIn(200); }}); } if($('.booked-upload-wrap').length){ $('.booked-upload-wrap input[type=file]').on('change',function(){ var fileName=$(this).val(); $(this).parent().find('span').html(fileName); $(this).parent().addClass('hasFile'); }); } $('body').on('click', '.booked-profile-appt-list .appt-block .cancel', function(e){ e.preventDefault(); var $button=$(this), $thisParent=$button.parents('.appt-block'), appt_id=$thisParent.attr('data-appt-id'); confirm_delete=confirm(booked_js_vars.i18n_confirm_appt_delete); if(confirm_delete==true){ var currentApptCount=parseInt($('.booked-profile-appt-list').find('h4').find('span.count').html()); currentApptCount=parseInt(currentApptCount - 1); if(currentApptCount < 1){ $('.booked-profile-appt-list').find('h4').find('span.count').html('0'); $('.no-appts-message').slideDown('fast'); }else{ $('.booked-profile-appt-list').find('h4').find('span.count').html(currentApptCount); } $('.appt-block').animate({'opacity':0.4},0); $thisParent.slideUp('fast',function(){ $(this).remove(); }); $.ajax({ 'url':booked_js_vars.ajax_url, 'method':'post', 'data':{ 'action':'booked_cancel_appt', 'appt_id':appt_id }, success: function(data){ $('.appt-block').animate({'opacity':1},150); }}); } return false; }); $('body').on('touchstart click','.bm-overlay, .bm-window .close, .booked-form .cancel',function(e){ e.preventDefault(); close_booked_modal(); return false; }); $('body') .on('focusin', '.booked-form input', function(){ if(this.title==this.value){ $(this).addClass('hasContent'); this.value=''; }}).on('focusout', '.booked-form input', function(){ if(this.value===''){ $(this).removeClass('hasContent'); this.value=this.title; }}); $('body').on('change','.booked-form input',function(){ var condition=$(this).attr('data-condition'), thisVal=$(this).val(); if(condition&&$('.condition-block').length){ $('.condition-block.'+condition).hide(); $('#condition-'+thisVal).fadeIn(200); resize_booked_modal(); }}); $('body').on('submit','form#ajaxlogin', function(e){ e.preventDefault(); $('form#ajaxlogin p.status').show().html('   ' + booked_js_vars.i18n_please_wait); resize_booked_modal(); var $this=$(this), date=$this.data('date'), title=$this.data('title'), timeslot=$this.data('timeslot'), calendar_id=$this.data('calendar-id'); $.ajax({ type:'post', url:booked_js_vars.ajax_url, data:$('form#ajaxlogin').serialize(), success:function(data){ if(data=='success'){ close_booked_modal(); var $button=$(''); $button.on('click', window.bookedNewAppointment); $button.triggerHandler('click'); $button.unbind('click', window.bookedNewAppointment); $button.detach(); }else{ $('form#ajaxlogin p.status').show().html('   ' + booked_js_vars.i18n_wrong_username_pass); resize_booked_modal(); }} }); e.preventDefault(); }); $('body').on('click','.booked-forgot-password',function(e){ e.preventDefault(); $('#ajaxlogin').hide(); $('#ajaxforgot').show(); resize_booked_modal(); }); $('body').on('click','.booked-forgot-goback',function(e){ e.preventDefault(); $('#ajaxlogin').show(); $('#ajaxforgot').hide(); resize_booked_modal(); }); $('body').on('submit','form#ajaxforgot', function(e){ e.preventDefault(); $('form#ajaxforgot p.status').show().html('   ' + booked_js_vars.i18n_please_wait); resize_booked_modal(); var $this=$(this); $.ajax({ type:'post', url:booked_js_vars.ajax_url, data:$('form#ajaxforgot').serialize(), success:function(data){ if(data=='success'){ e.preventDefault(); $('#ajaxlogin').show(); $('#ajaxforgot').hide(); $('form#ajaxlogin p.status').show().html('   ' + booked_js_vars.i18n_password_reset); resize_booked_modal(); }else{ $('form#ajaxforgot p.status').show().html('   ' + booked_js_vars.i18n_password_reset_error); resize_booked_modal(); }} }); e.preventDefault(); }); $('body').on('click','.booked-form input#submit-request-appointment',function(e){ $('form#newAppointmentForm p.status').show().html('   ' + booked_js_vars.i18n_please_wait); resize_booked_modal(); e.preventDefault(); var customerType=$('#newAppointmentForm input[name=customer_type]').val(), customerID=$('#newAppointmentForm input[name=user_id]').val(), name=$('#newAppointmentForm input[name=booked_appt_name]').val(), surname=$('#newAppointmentForm input[name=booked_appt_surname]').val(), surnameActive=$('#newAppointmentForm input[name=booked_appt_surname]').length, guest_name=$('#newAppointmentForm input[name=guest_name]').val(), guest_surname=$('#newAppointmentForm input[name=guest_surname]').val(), guest_surnameActive=$('#newAppointmentForm input[name=guest_surname]').length, guest_email=$('#newAppointmentForm input[name=guest_email]').val(), guest_emailActive=$('#newAppointmentForm input[name=guest_email]').length, email=$('#newAppointmentForm input[name=booked_appt_email]').val(), password=$('#newAppointmentForm input[name=booked_appt_password]').val(), showRequiredError=false, ajaxRequests=[]; $(this).parents('.booked-form').find('input,textarea,select').each(function(i,field){ var required=$(this).attr('required'); if(required&&$(field).attr('type')=='hidden'){ var fieldParts=$(field).attr('name'); fieldParts=fieldParts.split('---'); fieldName=fieldParts[0]; fieldNumber=fieldParts[1].split('___'); fieldNumber=fieldNumber[0]; if(fieldName=='radio-buttons-label'){ var radioValue=false; $('input:radio[name="single-radio-button---'+fieldNumber+'[]"]:checked').each(function(){ if($(this).val()){ radioValue=$(this).val(); }}); if(!radioValue){ showRequiredError=true; }}else if(fieldName=='checkboxes-label'){ var checkboxValue=false; $('input:checkbox[name="single-checkbox---'+fieldNumber+'[]"]:checked').each(function(){ if($(this).val()){ checkboxValue=$(this).val(); }}); if(!checkboxValue){ showRequiredError=true; }} }else if(required&&$(field).attr('type')!='hidden'&&$(field).val()==''){ showRequiredError=true; }}); if(showRequiredError){ $('form#newAppointmentForm p.status').show().html('   ' + booked_js_vars.i18n_fill_out_required_fields); resize_booked_modal(); return false; } if(customerType=='new'&&!name||customerType=='new'&&surnameActive&&!surname||customerType=='new'&&!email||customerType=='new'&&!password){ $('form#newAppointmentForm p.status').show().html('   ' + booked_js_vars.i18n_appt_required_fields); resize_booked_modal(); return false; } if(customerType=='guest'&&!guest_name||customerType=='guest'&&guest_emailActive&&!guest_email||customerType=='guest'&&guest_surnameActive&&!guest_surname){ $('form#newAppointmentForm p.status').show().html('   ' + booked_js_vars.i18n_appt_required_fields_guest); resize_booked_modal(); return false; } if(customerType=='current'&&customerID || customerType=='guest'&&guest_name&&!guest_surnameActive&&!guest_emailActive || customerType=='guest'&&guest_name&&guest_surnameActive&&guest_surname&&!guest_emailActive || customerType=='guest'&&guest_name&&guest_emailActive&&guest_email&&!guest_surnameActive || customerType=='guest'&&guest_name&&guest_emailActive&&guest_email&&guest_surnameActive&&guest_surname){ SubmitRequestAppointment.currentUserOrGuest(); } if(customerType=='new'&&name&&email&&password){ if(!surnameActive||surnameActive&&surname){ SubmitRequestAppointment.newUser(); }} }); var SubmitRequestAppointment={ formSelector: '#newAppointmentForm', formBtnRequestSelector: '.booked-form input#submit-request-appointment', formStatusSelector: 'p.status', formSubmitBtnSelector: '#submit-request-appointment', apptContainerSelector: '.booked-appointment-details', baseFields: [ 'guest_name','guest_surname','guest_email','action', 'customer_type', 'user_id' ], apptFields: [ 'appoinment', 'calendar_id', 'title', 'date', 'timestamp', 'timeslot' ], userFields: [ 'booked_appt_name','booked_appt_surname','booked_appt_email', 'booked_appt_password' ], captchaFields: [ 'captcha_word', 'captcha_code' ], currentApptIndex: false, currentApptCounter: false, hasAnyErrors: false, currentUserOrGuest: function(){ var total_appts=SubmitRequestAppointment._totalAppts(); if(! total_appts){ return; } SubmitRequestAppointment._showLoadingMessage(); SubmitRequestAppointment._resetDefaultValues(); var data=SubmitRequestAppointment._getBaseData(); SubmitRequestAppointment.currentApptIndex=0; SubmitRequestAppointment.currentApptCounter=1; SubmitRequestAppointment._doRequestAppointment(data, total_appts); }, newUser: function(){ var total_appts=SubmitRequestAppointment._totalAppts(); if(! total_appts){ return; } SubmitRequestAppointment._showLoadingMessage(); SubmitRequestAppointment._resetDefaultValues(); var data=SubmitRequestAppointment._getBaseData(); if(total_appts > 1){ var data_obj_with_no_reference=null; data_obj_with_no_reference=$.extend(true, {}, data); data_obj_with_no_reference=SubmitRequestAppointment._addUserRegistrationData(data_obj_with_no_reference); SubmitRequestAppointment._requestUserRegistration(data_obj_with_no_reference); data.customer_type='current'; }else{ data=SubmitRequestAppointment._addUserRegistrationData(data); } SubmitRequestAppointment.currentApptIndex=0; SubmitRequestAppointment._doRequestAppointment(data, total_appts); }, _doRequestAppointment: function(data, total_appts){ var appt_fields=SubmitRequestAppointment.apptFields; if(SubmitRequestAppointment.currentApptIndex===0){ SubmitRequestAppointment._hideCancelBtn(); SubmitRequestAppointment._disableSubmitBtn(); SubmitRequestAppointment.hasAnyErrors=false; } var data_obj_with_no_reference=$.extend(true, {}, data); for (var i=0; i < appt_fields.length; i++){ data_obj_with_no_reference[ appt_fields[i] ]=SubmitRequestAppointment._getFieldVal(appt_fields[i], SubmitRequestAppointment.currentApptIndex); } var calendar_id=SubmitRequestAppointment._getFieldVal('calendar_id', SubmitRequestAppointment.currentApptIndex); data_obj_with_no_reference=SubmitRequestAppointment._addCustomFieldsData(data_obj_with_no_reference, calendar_id); var $appt=SubmitRequestAppointment._getApptElement(SubmitRequestAppointment.currentApptIndex); if(! $appt.hasClass('skip')){ $.ajax({ type:'post', url:booked_js_vars.ajax_url, data:data_obj_with_no_reference, success:function(response){ SubmitRequestAppointment._requestAppointmentResponseHandler(response); SubmitRequestAppointment.currentApptIndex++; setTimeout(function(){ if(SubmitRequestAppointment.currentApptCounter===total_appts){ if(! SubmitRequestAppointment.hasAnyErrors){ SubmitRequestAppointment._onAfterRequestAppointment(); }else{ SubmitRequestAppointment._enableSubmitBtn(); SubmitRequestAppointment._showCancelBtn(); }}else{ SubmitRequestAppointment.currentApptCounter++; SubmitRequestAppointment._doRequestAppointment(data, total_appts); }}, 100); }}); }else{ SubmitRequestAppointment.currentApptIndex++; SubmitRequestAppointment.currentApptCounter++; SubmitRequestAppointment._doRequestAppointment(data, total_appts, SubmitRequestAppointment.currentApptIndex); }}, _totalAppts: function(){ return $(SubmitRequestAppointment.formSelector + ' input[name="appoinment[]"]').length; }, _getBaseData: function(){ var data={}, fields=SubmitRequestAppointment.baseFields; for(var i=0; i < fields.length; i++){ data[ fields[i] ]=SubmitRequestAppointment._getFieldVal(fields[i]); } data['is_fe_form']=true; data['total_appts']=SubmitRequestAppointment._totalAppts(); return data; }, _getFieldVal: function(field_name, field_index){ var field_name=typeof field_name==='undefined' ? '':field_name, field_index=typeof field_index==='undefined' ? false:field_index, selector=SubmitRequestAppointment.formSelector + ' '; if(field_index===false){ selector +=' [name=' + field_name + ']'; return $(selector).val(); } selector +=' [name="' + field_name + '[]"]'; return $(selector).eq(field_index).val(); }, _resetDefaultValues: function(){ $('.booked-form input').each(function(){ var thisVal=$(this).val(), thisDefault=$(this).attr('title'); if(thisDefault==thisVal){ $(this).val(''); }}); }, _resetToDefaultValues: function(){ $('.booked-form input').each(function(){ var thisVal=$(this).val(), thisDefault=$(this).attr('title'); if(! thisVal){ $(this).val(thisDefault); }}); }, _addUserRegistrationData: function(data){ $.each(SubmitRequestAppointment.userFields, function(index, field_name){ data[ field_name ]=SubmitRequestAppointment._getFieldVal(field_name); }); $.each(SubmitRequestAppointment.captchaFields, function(index, field_name){ var field_value=SubmitRequestAppointment._getFieldVal(field_name); if(! field_value){ return; } data[ field_name ]=field_value; }); return data; }, _addCustomFieldsData: function(data, calendar_id){ var custom_fields_data=$('.cf-block [name]') .filter(function(index){ var $this=$(this); return parseInt($this.data('calendar-id'))===parseInt(calendar_id)&&$this.attr('name').match(/---\d+/g); }) .each(function(index){ var $this=$(this), name=$this.attr('name'), value=$this.val(), type=$this.attr('type'); if(! value){ return; } if(! name.match(/checkbox|radio+/g)){ data[ name ]=value; return; } if(name.match(/radio+/g)&&$this.is(':checked')){ data[ name ]=value; return; } if(! name.match(/radio+/g)&&typeof data[ name ]==='undefined'||! name.match(/radio+/g)&&data[ name ].constructor!==Array){ data[ name ]=[]; } if(! $this.is(':checked')){ return; } data[ name ].push(value); }); return data; }, _requestUserRegistration: function(base_data, appt_index){ $.ajax({ type:'post', url:booked_js_vars.ajax_url, data:base_data, async:false, success:function(response){ SubmitRequestAppointment._requestUserRegistrationResponseHandler(response); }}); }, _requestUserRegistrationResponseHandler: function(response){ var response_parts=response.split('###'), data_result=response_parts[0].substr(response_parts[0].length - 5); if(data_result==='error'){ return; }}, _requestAppointment: function(response){ SubmitRequestAppointment._requestAppointmentResponseHandler(response); }, _requestAppointmentResponseHandler: function(response){ var response_parts=response.split('###'), data_result=response_parts[0].substr(response_parts[0].length - 5); if(data_result==='error'){ SubmitRequestAppointment._requestAppointmentOnError(response_parts); return; } SubmitRequestAppointment._requestAppointmentOnSuccess(response_parts); }, _requestAppointmentOnError: function(response_parts){ var $apptEl=SubmitRequestAppointment._getApptElement(); $(document).trigger("booked-on-requested-appt-error",[$apptEl]); SubmitRequestAppointment._highlightAppt(); SubmitRequestAppointment._setStatusMsg(response_parts[1]); SubmitRequestAppointment.hasAnyErrors=true; resize_booked_modal(); }, _requestAppointmentOnSuccess: function(response_parts){ var $apptEl=SubmitRequestAppointment._getApptElement(); $(document).trigger("booked-on-requested-appt-success",[$apptEl]); SubmitRequestAppointment._unhighlightAppt(); }, _onAfterRequestAppointment: function(){ var redirectObj={ redirect:false }; var redirect=$(document).trigger("booked-on-requested-appointment",[redirectObj]); if(redirectObj.redirect){ return; } if(booked_js_vars.profilePage){ window.location=booked_js_vars.profilePage; return; } SubmitRequestAppointment._reloadApptsList(); SubmitRequestAppointment._reloadCalendarTable(); }, _setStatusMsg: function(msg){ var form_status_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formStatusSelector; $(form_status_selector).show().html('   ' + msg); }, _getApptElement: function(appt_index){ var appt_index=typeof appt_index==='undefined' ? SubmitRequestAppointment.currentApptIndex:appt_index, appt_cnt_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.apptContainerSelector; return $(appt_cnt_selector).eq(appt_index); }, _highlightAppt: function(msg){ var $apptEl=SubmitRequestAppointment._getApptElement(); if(! $apptEl.length){ return; } $apptEl.addClass('has-error'); }, _unhighlightAppt: function(msg){ var $apptEl=SubmitRequestAppointment._getApptElement(); if(! $apptEl.length){ return; } $apptEl.removeClass('has-error').addClass('skip'); }, _enableSubmitBtn: function(){ var btn_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formSubmitBtnSelector; $(btn_selector).attr('disabled', false); }, _disableSubmitBtn: function(){ var btn_selector=SubmitRequestAppointment.formSelector + ' ' + SubmitRequestAppointment.formSubmitBtnSelector; $(btn_selector).attr('disabled', true); }, _showCancelBtn: function(){ $(SubmitRequestAppointment.formSelector).find('button.cancel').show(); }, _hideCancelBtn: function(){ $(SubmitRequestAppointment.formSelector).find('button.cancel').hide(); }, _showLoadingMessage: function(){ $('form#newAppointmentForm p.status').show().html('   ' + booked_js_vars.i18n_please_wait); }, _reloadApptsList: function(){ if(! $('.booked-appt-list').length){ return; } $('.booked-appt-list').each(function(){ var $thisApptList=$(this), date=$thisApptList.attr('data-list-date'), thisList=$thisApptList.parents('.booked-list-view'), defaultDate=thisList.attr('data-default'), calendar_id=parseInt($thisApptList.find('.booked-list-view-nav').attr('data-calendar-id'))||0; defaultDate=typeof defaultDate==='undefined' ? false:defaultDate; calendar_id=calendar_id ? calendar_id:0; thisList.addClass('booked-loading'); var booked_load_list_view_date_booking_options={ 'action':'booked_appointment_list_date', 'date':date, 'calendar_id':calendar_id, 'force_default':defaultDate }; $(document).trigger("booked-before-loading-appointment-list-booking-options"); thisList.spin('booked_top'); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_load_list_view_date_booking_options, success: function(html){ thisList.html(html); close_booked_modal(); init_appt_list_date_picker(); setTimeout(function(){ thisList.removeClass('booked-loading'); },1); }}); }); }, _reloadCalendarTable: function(){ if(! $('td.active').length){ return; } var $activeTD=$('td.active'), activeDate=$activeTD.attr('data-date'), calendar_id=parseInt($activeTD.parents('table').data('calendar-id'))||0; booked_load_calendar_date_booking_options={ 'action':'booked_calendar_date', 'date':activeDate, 'calendar_id':calendar_id }; $(document).trigger("booked-before-loading-calendar-booking-options"); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_load_calendar_date_booking_options, success: function(html){ $('tr.entryBlock').find('td').html(html); close_booked_modal(); $('tr.entryBlock').removeClass('booked-loading'); $('tr.entryBlock').find('.booked-appt-list').hide().fadeIn(300); $('tr.entryBlock').find('.booked-appt-list').addClass('shown'); adjust_calendar_boxes(); }}); }} }); function bookedRemoveEmptyTRs(){ $('table.booked-calendar').find('tr.week').each(function(){ if($(this).children().length==0){ $(this).remove(); }}); } function savingState(show,limit_to){ show=typeof show!=='undefined' ? show:true; limit_to=typeof limit_to!=='undefined' ? limit_to:false; if(limit_to){ var $savingStateDIV=limit_to.find('li.active .savingState, .topSavingState.savingState, .calendarSavingState'); var $stuffToHide=limit_to.find('.monthName'); var $stuffToTransparent=limit_to.find('table.booked-calendar tbody'); }else{ var $savingStateDIV=$('li.active .savingState, .topSavingState.savingState, .calendarSavingState'); var $stuffToHide=$('.monthName'); var $stuffToTransparent=$('table.booked-calendar tbody'); } if(show){ $savingStateDIV.fadeIn(200); $stuffToHide.hide(); $stuffToTransparent.animate({'opacity':0.2},100); }else{ $savingStateDIV.hide(); $stuffToHide.show(); $stuffToTransparent.animate({'opacity':1},0); }} $(document).ajaxStop(function(){ savingState(false); }); function init_appt_list_date_picker(){ $('.booked_list_date_picker').each(function(){ var thisDatePicker=$(this); var minDateVal=thisDatePicker.parents('.booked-appt-list').attr('data-min-date'); var maxDateVal=thisDatePicker.parents('.booked-appt-list').attr('data-max-date'); if(typeof minDateVal=='undefined'){ var minDateVal=thisDatePicker.attr('data-min-date'); } thisDatePicker.datepicker({ dateFormat: 'yy-mm-dd', minDate: minDateVal, maxDate: maxDateVal, showAnim: false, beforeShow: function(input, inst){ $('#ui-datepicker-div').removeClass(); $('#ui-datepicker-div').addClass('booked_custom_date_picker'); }, onClose: function(dateText){ $('.booked_list_date_picker_trigger').removeClass('booked-dp-active'); }, onSelect: function(dateText){ var thisInput=$(this), date=dateText, thisList=thisInput.parents('.booked-list-view'), defaultDate=thisList.attr('data-default'), calendar_id=thisInput.parents('.booked-list-view-nav').attr('data-calendar-id'); if(typeof defaultDate=='undefined'){ defaultDate=false; } if(!calendar_id){ calendar_id=0; } thisList.addClass('booked-loading'); var booked_load_list_view_date_booking_options={ 'action':'booked_appointment_list_date', 'date':date, 'calendar_id':calendar_id, 'force_default':defaultDate }; $(document).trigger("booked-before-loading-appointment-list-booking-options"); thisList.spin('booked_top'); $.ajax({ url: booked_js_vars.ajax_url, type: 'post', data: booked_load_list_view_date_booking_options, success: function(html){ thisList.html(html); init_appt_list_date_picker(); setTimeout(function(){ thisList.removeClass('booked-loading'); },1); }}); return false; }}); }); $('body').on('click','.booked_list_date_picker_trigger',function(e){ e.preventDefault(); if(!$(this).hasClass('booked-dp-active')){ $(this).addClass('booked-dp-active'); $(this).parents('.booked-appt-list').find('.booked_list_date_picker').datepicker('show'); }}); } var BookedTabs={ bookingModalSelector: '.booked-modal', tabSelector: '.booked-tabs', tabNavSelector: '.booked-tabs-nav span', tabCntSelector: '.booked-tabs-cnt', Init: function(){ $(document).on('click', this.tabNavSelector, this.tabsNav); }, tabsNav: function(event){ event.preventDefault(); BookedTabs.switchToTab($(this)); BookedTabs.maybeResizeBookingModal(); }, switchToTab: function(tab_nav_item){ var $nav_item=tab_nav_item, tab_cnt_class='.' + $nav_item.data('tab-cnt'), $tabs_container=$nav_item.parents(BookedTabs.tabSelector); $nav_item .addClass('active') .siblings() .removeClass('active') $tabs_container .find(BookedTabs.tabCntSelector + ' ' + tab_cnt_class) .addClass('active') .siblings() .removeClass('active'); }, maybeResizeBookingModal: function(){ if(! $(BookedTabs.bookingModalSelector).length){ return; } resize_booked_modal(); }} })(jQuery, window, document); function create_booked_modal(){ var windowHeight=jQuery(window).height(); var windowWidth=jQuery(window).width(); if(windowWidth > 720){ var maxModalHeight=windowHeight - 295; }else{ var maxModalHeight=windowHeight; } jQuery('body input, body textarea, body select').blur(); jQuery('body').addClass('booked-noScroll'); jQuery('
').appendTo('body'); jQuery('.booked-modal .bm-overlay').spin('booked_white'); jQuery('.booked-modal .bm-window').css({'max-height':maxModalHeight+'px'}); } var previousRealModalHeight=100; function resize_booked_modal(){ var windowHeight=jQuery(window).height(); var windowWidth=jQuery(window).width(); var common43=43; if(jQuery('.booked-modal .bm-window .booked-scrollable').length){ var realModalHeight=jQuery('.booked-modal .bm-window .booked-scrollable')[0].scrollHeight; if(realModalHeight < 100){ realModalHeight=previousRealModalHeight; }else{ previousRealModalHeight=realModalHeight; }}else{ var realModalHeight=0; } var minimumWindowHeight=realModalHeight + common43 + common43; var modalScrollableHeight=realModalHeight - common43; var maxModalHeight; var maxFormHeight; if(windowHeight < minimumWindowHeight){ modalScrollableHeight=windowHeight - common43 - common43; }else{ modalScrollableHeight=realModalHeight; } if(windowWidth > 720){ maxModalHeight=modalScrollableHeight - 25; maxFormHeight=maxModalHeight - 15; var modalNegMargin=(maxModalHeight + 78) / 2; }else{ maxModalHeight=windowHeight - common43; maxFormHeight=maxModalHeight - 60; var modalNegMargin=(maxModalHeight) / 2; } jQuery('.booked-modal').css({'margin-top':'-'+modalNegMargin+'px'}); jQuery('.booked-modal .bm-window').css({'max-height':maxModalHeight+'px'}); jQuery('.booked-modal .bm-window .booked-scrollable').css({'max-height':maxFormHeight+'px'}); } function close_booked_modal(){ var modal=jQuery('.booked-modal'); modal.fadeOut(200); modal.addClass('bm-closing'); jQuery('body').removeClass('booked-noScroll'); setTimeout(function(){ modal.remove(); },300); } function init_tooltips(container){ jQuery('.tooltipster').tooltipster({ theme: 'tooltipster-light', animation: 'grow', speed: 200, delay: 50, offsetY: -15 }); } function adjust_calendar_boxes(){ jQuery('.booked-calendar').each(function(){ var windowWidth=jQuery(window).width(); var smallCalendar=jQuery(this).parents('.booked-calendar-wrap').hasClass('small'); var boxesWidth=jQuery(this).find('tbody tr.week td').width(); var calendarHeight=jQuery(this).height(); boxesHeight=boxesWidth * 1; jQuery(this).find('tbody tr.week td').height(boxesHeight); jQuery(this).find('tbody tr.week td .date').css('line-height',boxesHeight+'px'); jQuery(this).find('tbody tr.week td .date .number').css('line-height',boxesHeight+'px'); if(smallCalendar||windowWidth < 720){ jQuery(this).find('tbody tr.week td .date .number').css('line-height',boxesHeight+'px'); }else{ jQuery(this).find('tbody tr.week td .date .number').css('line-height',''); } var calendarHeight=jQuery(this).height(); jQuery(this).parent().height(calendarHeight); }); }; (function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); wpcf7.setStatus($form, 'init'); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } wpcf7.resetCounter($form); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; switch(data.status){ case 'init': wpcf7.setStatus($form, 'init'); break; case 'validation_failed': $.each(data.invalid_fields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('.wpcf7-form-control', this).attr('aria-describedby', n.error_id ); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); wpcf7.setStatus($form, 'invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': wpcf7.setStatus($form, 'unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': wpcf7.setStatus($form, 'spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': wpcf7.setStatus($form, 'aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': wpcf7.setStatus($form, 'sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': wpcf7.setStatus($form, 'failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: wpcf7.setStatus($form, 'custom-' + data.status.replace(/[^0-9a-z]+/i, '-') ); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); wpcf7.resetCounter($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $('.wpcf7-response-output', $form) .html('').append(data.message).slideDown('fast'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $('[role="status"]', $response).html(data.message); if(data.invalid_fields){ $.each(data.invalid_fields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $li.attr('id', n.error_id); $('ul', $response).append($li); }); }}); if(data.posted_data_hash){ $form.find('input[name="_wpcf7_posted_data_hash"]').first() .val(data.posted_data_hash); }}; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $(target).get(0).dispatchEvent(event); }; wpcf7.setStatus=function(form, status){ var $form=$(form); var prevStatus=$form.attr('data-status'); $form.data('status', status); $form.addClass(status); $form.attr('data-status', status); if(prevStatus&&prevStatus!==status){ $form.removeClass(prevStatus); }} wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.resetCounter=function(form){ var $form=$(form); $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('').attr({ 'class': 'wpcf7-not-valid-tip', 'aria-hidden': 'true', }).text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.siblings('.screen-reader-response').each(function(){ $('[role="status"]', this).html(''); $('ul', this).html(''); }); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form).hide().empty(); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); var cff_js_exists=(typeof cff_js_exists!=='undefined') ? true:false; if(!cff_js_exists){ if(jQuery('#cff.cff-masonry-js').length){ !function(a){function b(){} function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})} function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")} return this} return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}} if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}} var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c} var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){} function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1} function c(a){return function(){return this[a].apply(this,arguments)}} var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}} var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b} function c(){} function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0} return a} function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}} function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q} var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}} function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c} var j,k,l,m=!1;return h} var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))} function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()} function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}} function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b} var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)} function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}} function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1} function e(a,d){return c(a),b(a,d)} var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c} var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)} return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue} var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0} function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())} var h=a.getComputedStyle,i=h?function(a){return h(a,null)}:function(a){return a.currentStyle},j=d("transition"),k=d("transform"),l=j&&k,m=!!d("perspective"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[j],o=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var a={},b=0,c=o.length;c>b;b++){var e=o[b],f=d(e);f&&f!==e&&(a[e]=f)} return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=p[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=i(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var g=this.layout.size;e-=c?g.paddingLeft:g.paddingRight,f-=d?g.paddingTop:g.paddingBottom,this.position.x=e,this.position.y=f},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];g=b.percentPosition&&!b.isHorizontal?g/a.width*100+"%":g+"px",c[e]=g,c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];k=b.percentPosition&&b.isHorizontal?k/a.height*100+"%":k+"px",c[i]=k,c[j]="",this.css(c),this.emitEvent("layout",[this])};var q=m?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=q(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=l?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null} this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r=k&&e.toDashed(k)+",opacity";g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(n,this,!1))},g.prototype.transition=g.prototype[j?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]} this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(n,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!j||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()} var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)} return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)} return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)} this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.emitEvent(a+"Complete",[b])} function d(){g++,g===f&&c()} var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout} this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)} return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()} this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)} return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth} var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)} return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}) function cffAddMasonry($self){ if(jQuery(window).width() > 780||$self.hasClass('masonry-2-mobile')){ $self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry'); if($self.find('.cff-item').length){ $self.masonry({itemSelector: '.cff-new, .cff-item, .cff-likebox'}); $self.find('.cff-item').each(function(){ jQuery(this).css('margin-bottom', '15px'); }); }else if($self.find('.cff-album-item').length){ $self.masonry({itemSelector: '.cff-album-item'}); }}else{ $self.addClass('cff-disable-masonry'); }} } function cff_init(){ jQuery('.cff-likebox iframe').each(function(){ var $likebox=jQuery(this), likeboxWidth=$likebox.attr('data-likebox-width'), cffFeedWidth=$likebox.parent().width(); if(likeboxWidth=='') likeboxWidth=340; if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth; $likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+Math.floor(likeboxWidth)+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale')); }); jQuery('#cff .cff-item').each(function(){ var $self=jQuery(this); if($self.find('.cff-viewpost-facebook').parent('p').length){ $self.find('.cff-viewpost-facebook').unwrap('p'); } if($self.find('.cff-author').parent('p').length){ $self.find('.cff-author').eq(1).unwrap('p'); $self.find('.cff-author').eq(1).remove(); } if($self.find('#cff .cff-link').parent('p').length){ $self.find('#cff .cff-link').unwrap('p'); } var expanded=false, $post_text=$self.find('.cff-post-text .cff-text'), text_limit=$self.closest('#cff').attr('data-char'); if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999; if($post_text.find('a.cff-post-text-link').length) $post_text=$self.find('.cff-post-text .cff-text a'); var full_text=$post_text.html(); if(full_text==undefined) full_text=''; var cff_trunc_regx=new RegExp(/(<[^>]*>)/g); var cff_trunc_counter=0; full_text_arr=full_text.split(cff_trunc_regx); for (var i=0, len=full_text_arr.length; i < len; i++){ if(!(cff_trunc_regx.test(full_text_arr[i]))){ if(cff_trunc_counter==text_limit){ full_text_arr.splice(i, 1); continue; } cff_trunc_counter=cff_trunc_counter + full_text_arr[i].length; if(cff_trunc_counter > text_limit){ var diff=cff_trunc_counter - text_limit; full_text_arr[i]=full_text_arr[i].slice(0, -diff); cff_trunc_counter=text_limit; if(full_text.length > text_limit) $self.find('.cff-expand').show(); }} } var short_text=full_text_arr.join(''); short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g, ""); var lastChar=short_text.substr(short_text.length - 1); if(lastChar=='<') short_text=short_text.substring(0, short_text.length - 1); short_text=short_text.replace(/(
    \s*)+$/,''); short_text=short_text.replace(/(\s*)+$/,''); $post_text.html(short_text); $self.find('.cff-expand a').unbind('click').bind('click', function(e){ e.preventDefault(); var $expand=jQuery(this), $more=$expand.find('.cff-more'), $less=$expand.find('.cff-less'); if(expanded==false){ $post_text.html(full_text); expanded=true; $more.hide(); $less.show(); }else{ $post_text.html(short_text); expanded=false; $more.show(); $less.hide(); } cffLinkHashtags(); $post_text.find('a').attr('target', '_blank'); }); $post_text.find('a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow' }); $sharedLink=$self.find('.cff-shared-link'); if($sharedLink.text()==''){ $sharedLink.remove(); } function cffLinkHashtags(){ var cffTextStr=$self.find('.cff-text').html(), cffDescStr=$self.find('.cff-post-desc').html(), regex=/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi, linkcolor=$self.find('.cff-text').attr('data-color'); function replacer(hash){ var replacementString=jQuery.trim(hash); if(/^#[0-9A-F]{6}$/i.test(replacementString)){ return replacementString; }else{ return ' ' + replacementString + ''; }} if(typeof cfflinkhashtags=='undefined') cfflinkhashtags='true'; if(cfflinkhashtags=='true'){ var $cffText=$self.find('.cff-text'); if($cffText.length > 0){ cffTextStr=cffTextStr.replace(/
    /g, "
    "); $cffText.html(cffTextStr.replace(regex , replacer)); }} if($self.find('.cff-post-desc').length > 0) $self.find('.cff-post-desc').html(cffDescStr.replace(regex , replacer)); } cffLinkHashtags(); $self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow noopener noreferrer' }); $self.find('.cff-share-link').unbind().bind('click', function(e){ e.preventDefault(); var $cffShareTooltip=$self.find('.cff-share-tooltip') if($cffShareTooltip.is(':visible')){ $cffShareTooltip.hide().find('a').removeClass('cff-show'); }else{ $cffShareTooltip.show(); var time=0; $cffShareTooltip.find('a').each(function(){ var $cffShareIcon=jQuery(this); setTimeout(function(){ $cffShareIcon.addClass('cff-show'); }, time); time +=20; }); }}); }); jQuery('.cff-wrapper').each(function(){ var $cff=jQuery(this).find('#cff'); if(typeof $cff.attr('data-nummobile')!=='undefined'){ var num=typeof $cff.attr('data-pag-num')!=='undefined'&&$cff.attr('data-pag-num')!=='' ? parseInt($cff.attr('data-pag-num')):1, nummobile=typeof $cff.attr('data-nummobile')!=='undefined'&&$cff.attr('data-nummobile')!=='' ? parseInt($cff.attr('data-nummobile')):num, itemSelector=$cff.find('.cff-item').length ? '.cff-item':'.cff-album-item'; if(jQuery(window).width() < 480){ if(nummobile < $cff.find(itemSelector).length){ $cff.find(itemSelector).slice(nummobile - $cff.find(itemSelector).length).addClass('cff-num-diff-hide'); }}else{ if(num < $cff.find(itemSelector).length){ $cff.find(itemSelector).slice(num - $cff.find(itemSelector).length).addClass('cff-num-diff-hide'); }} $cff.removeAttr('data-nummobile'); } if($cff.hasClass('cff-masonry-js')){ cffAddMasonry($cff); setTimeout(function(){ cffAddMasonry($cff); }, 500); jQuery(window).resize(function (){ setTimeout(function(){ cffAddMasonry($cff); }, 500); }); if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30); }}); function cffSizeVisualHeader(){ jQuery('.cff-visual-header.cff-has-cover').each(function(){ var wrapperHeight=jQuery(this).find('.cff-header-hero').innerHeight(), imageHeight=jQuery(this).find('.cff-header-hero img').innerHeight(), wrapperWidth=jQuery(this).find('.cff-header-hero').innerWidth(), imageWidth=jQuery(this).find('.cff-header-hero img').innerWidth(), wrapperAspect=wrapperWidth/wrapperHeight, imageAspect=imageWidth/imageHeight, width=wrapperAspect < imageAspect ? wrapperHeight * imageAspect + 'px':'100%', difference=imageHeight - wrapperHeight, topMargin=Math.max(0,Math.round(difference/2)), leftMargin=width!=='100%' ? Math.max(0,Math.round(((wrapperHeight * imageAspect)-wrapperWidth)/2)):0; jQuery(this).find('.cff-header-hero img').css({ 'opacity':1, 'display':'block', 'visibility':'visible', 'max-width':'none', 'max-height':'none', 'margin-top':- topMargin + 'px', 'margin-left':- leftMargin + 'px', 'width':width, }); }); }setTimeout(cffSizeVisualHeader, 200); jQuery(window).resize(function (){ setTimeout(function(){ cffSizeVisualHeader(); }, 500); }); } cff_init(); }; ;(function($, window, document, undefined){ var $win=$(window); $win.on('load', function(){ var ajaxRequests=[]; $('.booked-tabs').find('li a div.counter').each(function(){ var thisCounter=$(this), thisTabName=$(this).parent().attr('href'); thisTabName=thisTabName.split('#'); thisTabName=thisTabName[1]; totalAppointments=$('#profile-'+thisTabName).find('.appt-block').length; if(totalAppointments > 0){ thisCounter.html(totalAppointments).fadeIn('fast'); }}); $('.booked-fea-appt-list').on('click', '.user', function(e){ e.preventDefault(); var $thisLink=$(this), user_id=$thisLink.attr('data-user-id'), appt_id=$thisLink.parent().attr('data-appt-id'), booked_ajaxURL=booked_fea_vars.ajax_url; create_booked_modal(); $.ajax({ url: booked_ajaxURL, type: 'post', data: { action: 'booked_fea_user_info_modal', user_id: user_id, appt_id: appt_id }, success: function(html){ $('.bm-window').html(html); var bookedModal=$('.booked-modal'); var bmWindow=bookedModal.find('.bm-window'); bmWindow.css({'visibility':'hidden'}); bookedModal.removeClass('bm-loading'); resize_booked_modal(); bmWindow.hide(); setTimeout(function(){ bmWindow.css({'visibility':'visible'}); bmWindow.show(); },50); }}); return false; }); $('.booked-fea-appt-list').on('click', '.booked-show-cf', function(e){ e.preventDefault(); var hiddenBlock=$(this).parent().find('.cf-meta-values-hidden'); if(hiddenBlock.is(':visible')){ hiddenBlock.hide(); }else{ hiddenBlock.show(); } return false; }); $('.booked-fea-appt-list').on('click', '.appt-block .approve', function(e){ e.preventDefault(); var $button=$(this), $thisParent=$button.parents('.appt-block'), appt_id=$thisParent.attr('data-appt-id'), booked_ajaxURL=booked_fea_vars.ajax_url; confirm_appt_approve=confirm(booked_fea_vars.i18n_confirm_appt_approve); if(confirm_appt_approve==true){ var currentApptCount=parseInt($button.parents('.booked-fea-appt-list').find('h4 span.count').html()); currentApptCount=parseInt(currentApptCount - 1); $button.parents('.booked-fea-appt-list').find('h4 span.count').html(currentApptCount); if($button.parents('#profile-fea_pending').length){ if(currentApptCount < 1){ $('.booked-tabs').find('li a[href="#fea_pending"] .counter').remove(); }else{ $('.booked-tabs').find('li a[href="#fea_pending"] .counter').html(currentApptCount); }} $('.appt-block').animate({'opacity':0.4},0); $button.remove(); $.ajax({ 'method':'post', 'url':booked_ajaxURL, 'data': { 'action':'booked_fea_approve_appt', 'appt_id':appt_id }, success: function(data){ $('.appt-block').animate({'opacity':1},150); }}); } return false; }); $('.booked-fea-appt-list').on('click', '.appt-block .delete', function(e){ e.preventDefault(); var $button=$(this), $thisParent=$button.parents('.appt-block'), appt_id=$thisParent.attr('data-appt-id'), booked_ajaxURL=booked_fea_vars.ajax_url; confirm_appt_delete=confirm(booked_fea_vars.i18n_confirm_appt_delete); if(confirm_appt_delete==true){ var currentApptCount=parseInt($button.parents('.booked-fea-appt-list').find('h4 span.count').html()); currentApptCount=parseInt(currentApptCount - 1); $button.parents('.booked-fea-appt-list').find('h4 span.count').html(currentApptCount); if($button.parents('#profile-fea_pending').length){ if(currentApptCount < 1){ $('.booked-tabs').find('li a[href="#fea_pending"] .counter').remove(); }else{ $('.booked-tabs').find('li a[href="#fea_pending"] .counter').html(currentApptCount); }} $('.appt-block').animate({'opacity':0.4},0); $thisParent.slideUp('fast',function(){ $(this).remove(); }); $.ajax({ 'method':'post', 'url':booked_ajaxURL, 'data': { 'action':'booked_fea_delete_appt', 'appt_id':appt_id }, success: function(data){ $('.appt-block').animate({'opacity':1},150); }}); } return false; }); }); })(jQuery, window, document); !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(h){var s,i=0,a=Array.prototype.slice;return h.cleanData=(s=h.cleanData,function(t){var e,i,n;for(n=0;null!=(i=t[n]);n++)try{(e=h._data(i,"events"))&&e.remove&&h(i).triggerHandler("remove")}catch(t){}s(t)}),h.widget=function(t,i,e){var n,s,o,r,a={},u=t.split(".")[0];return t=t.split(".")[1],n=u+"-"+t,e||(e=i,i=h.Widget),h.expr[":"][n.toLowerCase()]=function(t){return!!h.data(t,n)},h[u]=h[u]||{},s=h[u][t],o=h[u][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},h.extend(o,s,{version:e.version,_proto:h.extend({},e),_childConstructors:[]}),(r=new i).options=h.widget.extend({},r.options),h.each(e,function(e,n){function s(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}h.isFunction(n)?a[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:a[e]=n}),o.prototype=h.widget.extend(r,{widgetEventPrefix:s&&r.widgetEventPrefix||t},a,{constructor:o,namespace:u,widgetName:t,widgetFullName:n}),s?(h.each(s._childConstructors,function(t,e){var i=e.prototype;h.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),h.widget.bridge(t,o),o},h.widget.extend=function(t){for(var e,i,n=a.call(arguments,1),s=0,o=n.length;s",options:{disabled:!1,create:null},_createWidget:function(t,e){e=h(e||this.defaultElement||this)[0],this.element=h(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=h(),this.hoverable=h(),this.focusable=h(),e!==this&&(h.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=h(e.style?e.ownerDocument:e.document||e),this.window=h(this.document[0].defaultView||this.document[0].parentWindow)),this.options=h.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:h.noop,_getCreateEventData:h.noop,_create:h.noop,_init:h.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(h.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:h.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return h.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=h.widget.extend({},this.options[t]),s=0;s?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=l.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!l.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=l()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=l()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var o=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){l(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){l(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return l("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=l(),this.anchors.each(function(t,e){var i,a,s,n=l(e).uniqueId().attr("id"),r=l(e).closest("li"),h=r.attr("aria-controls");o._isLocal(e)?(s=(i=e.hash).substring(1),a=o.element.find(o._sanitizeSelector(i))):(i="#"+(s=r.attr("aria-controls")||l({}).uniqueId()[0].id),(a=o.element.find(i)).length||(a=o._createPanel(s)).insertAfter(o.panels[t-1]||o.tablist),a.attr("aria-live","polite")),a.length&&(o.panels=o.panels.add(a)),h&&r.data("ui-tabs-aria-controls",h),r.attr({"aria-controls":s,"aria-labelledby":n}),a.attr("aria-labelledby",n)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return l("
    ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){l.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var e,i=0;e=this.tabs[i];i++)!0===t||-1!==l.inArray(i,t)?l(e).addClass("ui-state-disabled").attr("aria-disabled","true"):l(e).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&l.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=l(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=l(this).outerHeight(!0)}),this.panels.each(function(){l(this).height(Math.max(0,i-l(this).innerHeight()+l(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,l(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,a=l(t.currentTarget).closest("li"),s=a[0]===i[0],n=s&&e.collapsible,r=n?l():this._getPanelForTab(a),h=i.length?this._getPanelForTab(i):l(),o={oldTab:i,oldPanel:h,newTab:n?l():a,newPanel:r};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||s&&!e.collapsible||!1===this._trigger("beforeActivate",t,o)||(e.active=!n&&this.tabs.index(a),this.active=s?l():a,this.xhr&&this.xhr.abort(),h.length||r.length||l.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(a),t),this._toggle(t,o))},_toggle:function(t,e){var i=this,a=e.newPanel,s=e.oldPanel;function n(){i.running=!1,i._trigger("activate",t,e)}function r(){e.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&i.options.show?i._show(a,i.options.show,n):(a.show(),n())}this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(e.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),r()),s.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&s.length?e.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===l(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var e,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),e=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:e,currentTarget:e,preventDefault:l.noop}))},_findActive:function(t){return!1===t?l():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){l.data(this,"ui-tabs-destroy")?l(this).remove():l(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=l(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),l.isArray(t)?l.map(t,function(t){return t!==i?t:null}):l.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==l.inArray(t,e))return;e=l.isArray(e)?l.merge([t],e).sort():[t]}this._setupDisabled(e)}},load:function(t,a){t=this._getIndex(t);function s(t,e){"abort"===e&&n.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr}var n=this,i=this.tabs.eq(t),e=i.find(".ui-tabs-anchor"),r=this._getPanelForTab(i),h={tab:i,panel:r};this._isLocal(e[0])||(this.xhr=l.ajax(this._ajaxSettings(e,a,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(i.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){r.html(t),n._trigger("load",a,h),s(i,e)},1)}).fail(function(t,e){setTimeout(function(){s(t,e)},1)})))},_ajaxSettings:function(t,i,a){var s=this;return{url:t.attr("href"),beforeSend:function(t,e){return s._trigger("beforeLoad",i,l.extend({jqXHR:t,ajaxSettings:e},a))}}},_getPanelForTab:function(t){var e=l(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+e))}});var a}); !function(e){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],e):e(jQuery)}(function(d){return d.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=d(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():d()}},_createIcons:function(){var e=this.options.icons;e&&(d("").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))):this._activate(t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=d.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(d(e.target).attr("tabIndex",-1),d(s).attr("tabIndex",0),s.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===d.ui.keyCode.UP&&e.ctrlKey&&d(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=d()):!1===e.active?this._activate(0):this.active.length&&!d.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=d()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent();this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=d(this),t=e.uniqueId().attr("id"),i=e.next(),a=i.uniqueId().attr("id");e.attr("aria-controls",a),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=d(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=d(this).outerHeight(!0)}),this.headers.next().each(function(){d(this).height(Math.max(0,i-d(this).innerHeight()+d(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){i=Math.max(i,d(this).css("height","").height())}).height(i))},_activate:function(e){var t=this._findActive(e)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:d.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):d()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&d.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=d(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,r=n?d():a.next(),o=i.next(),h={oldHeader:i,oldPanel:o,newHeader:n?d():a,newPanel:r};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,h)||(t.active=!n&&this.headers.index(a),this.active=s?d():a,this._toggle(h),i.removeClass("ui-accordion-header-active ui-state-active"),t.icons&&i.children(".ui-accordion-header-icon").removeClass(t.icons.activeHeader).addClass(t.icons.header),s||(a.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),t.icons&&a.children(".ui-accordion-header-icon").removeClass(t.icons.header).addClass(t.icons.activeHeader),a.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(d(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){function a(){o._toggleComplete(t)}var s,n,r,o=this,h=0,d=e.css("box-sizing"),c=e.length&&(!i.length||e.index()',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&m.IS_IOS&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,y.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{18:18,2:2,28:28,29:29,7:7}],13:[function(e,t,n){"use strict";var p=r(e(2)),o=e(18),i=r(o),m=r(e(7)),g=e(27),E=e(32),b=e(28);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,y=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'00:00':"",o=p.default.createElement("div");o.className=y.options.classPrefix+"time-rail",o.innerHTML=''+n+"",y.addControlElement(o,"progress"),y.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,y.newTime=a*y.getDuration(),v&&null!==y.getCurrentTime()&&y.newTime.toFixed(4)!==y.getCurrentTime().toFixed(4)&&(y.setCurrentRailHandle(y.newTime),y.updateCurrent(y.newTime)),!g.IS_IOS&&!g.IS_ANDROID){if(l<0&&(l=0),y.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(y.handle)[i]).m41,c=l/parseFloat(getComputedStyle(y.total).width)-u/parseFloat(getComputedStyle(y.total).width);y.hovered.style.left=u+"px",y.setTransformStyle(y.hovered,"scaleX("+c+")"),y.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(y.hovered,"negative"):(0,b.addClass)(y.hovered,"negative")}if(y.timefloat){var f=y.timefloat.offsetWidth/2,p=mejs.Utils.offset(y.getElement(y.container)),m=getComputedStyle(y.timefloat);s=d-p.left=y.getElement(y.container).offsetWidth-f?y.total.offsetWidth-f:l,(0,b.hasClass)(y.getElement(y.container),y.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+y.timefloat.offsetWidth/2),y.timefloat.style.left=s+"px",y.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(y.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),y.timefloat.style.display="block"}}}else g.IS_IOS||g.IS_ANDROID||!y.timefloat||(s=y.timefloat.offsetWidth+o>=y.getElement(y.container).offsetWidth?y.timefloat.offsetWidth/2:0,y.timefloat.style.left=s+"px",y.timefloat.style.left=s+"px",y.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&y.play()};y.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),y.slider.addEventListener("blur",function(){h.options.autoRewind=t}),y.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=y.paused),y.options.enableKeyboard&&y.options.keyActions.length){var t=e.which||e.keyCode||0,n=y.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=y.getCurrentTime(),a=y.getElement(y.container).querySelector("."+y.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),y.isVideo&&(y.showControls(),y.startControlsTimer());var s=38===t?Math.min(y.volume+.1,1):Math.max(y.volume-.1,0),l=s<=0;return y.setVolume(s),void y.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:y.getDuration()!==1/0&&(r-=i);break;case 39:y.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(g.IS_FIREFOX&&(y.paused?y.play():y.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),r | "}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML=''+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML=''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5
    ',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='
    ",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='
      ';for(var u=0,c=0;c"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a>1].start,a=e[i].stop,r<=t&&t ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a$1"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=(e=$(e).filter("tt")).firstChild,n=t.querySelectorAll("p"),o=e.getElementById(""+t.attr("style")),i=[],r=void 0;if(o.length){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s$1"),i.push(f)}return i}}}},{18:18,2:2,28:28,29:29,32:32,7:7,9:9}],16:[function(e,t,n){"use strict";var w=i(e(2)),x=e(18),o=i(x),T=i(e(7)),P=e(27),C=e(29),k=e(28);function i(e){return e&&e.__esModule?e:{default:e}}Object.assign(x.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(o.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,C.isString)(a.options.muteText)?a.options.muteText:T.default.t("mejs.mute"),l=(0,C.isString)(a.options.unmuteText)?a.options.unmuteText:T.default.t("mejs.unmute"),i=(0,C.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:T.default.t("mejs.volume-help-text"),d=w.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'':''+i+'
      ',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+x.config.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0'+i+'
      ',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),y="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),g=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,k.removeClass)(d,a.options.classPrefix+"mute"),(0,k.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,k.removeClass)(d,a.options.classPrefix+"unmute"),(0,k.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(y);"vertical"===s?(v.style.bottom=0,v.style.height=o,y.style.bottom=o,y.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,y.style.left=o,y.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,k.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),g(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(g(0),(0,k.removeClass)(d,a.options.classPrefix+"mute"),(0,k.addClass)(d,a.options.classPrefix+"unmute")):(g(o.volume),(0,k.removeClass)(d,a.options.classPrefix+"unmute"),(0,k.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,g(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,C.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),e.options.startVolume=0,b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{18:18,2:2,27:27,28:28,29:29,7:7}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n
      ',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,E.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!T.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=w.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}if(x.IS_ANDROID&&T.addClass(n.getElement(n.container),n.options.classPrefix+"android"),x.IS_IOS&&T.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),x.IS_IPAD&&T.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),x.IS_IPHONE&&T.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),T.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),x.IS_SAFARI&&!x.IS_IOS){T.addClass(n.getElement(n.container),n.options.classPrefix+"hide-cues");for(var a=n.node.cloneNode(),s=n.node.children,l=[],d=[],u=0,c=s.length;u=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(v.default.MepDefaults=e,new y.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var h=(0,E.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(h)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){T.fadeIn(i.getElement(i.controls),200,function(){T.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,E.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){T.fadeIn(n[e],200,function(){T.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t'),e.message&&(a="

      "+e.message+"

      "),e.urls)for(var d=0,u=e.urls.length;d'+v.default.i18n.t("mejs.download-file")+": "+c.src+""}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var e,o=this,t=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(x.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&T.visible(t))return t;n=t}return null}(),n=t?getComputedStyle(t,null):getComputedStyle(w.default.body,null),i=o.isVideo?o.node.videoWidth&&0=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100=o.width?parseFloat(d/a,10):parseFloat(d*a,10):r,isNaN(l)&&(l=s),0img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='
      ',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='
      ',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||x.IS_FIREFOX&&32===t){var n=(0,E.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||x.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!x.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",x.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",x.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(w.default.createEvent){var e=w.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=w.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;oimg");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,b.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s
      '+N.default.t("mejs.install-flash")+"
      "}else w=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+g.join("&")+'"'],E?(w.push('width="'+S+'"'),w.push('height="'+b+'"')):w.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2x',t.firstChild.href}function d(e){var t=1'+mejsL10n.strings["mejs.download-file"]+""},n(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(e)}}},n(e.wp.mediaelement.initialize)}(window,jQuery); (function ($){ $.fn.appear=function (fn, options){ var settings=$.extend({data: undefined, one: true, accX: 0, accY: 0}, options); return this.each(function (){ var t=$(this); t.appeared=false; if(!fn){ t.trigger('appear', settings.data); return; } var w=$(window); var check=function (){ if(!t.is(':visible')){ t.appeared=false; return; } var a=w.scrollLeft(); var b=w.scrollTop(); var o=t.offset(); var x=o.left; var y=o.top; var ax=settings.accX; var ay=settings.accY; var th=t.height(); var wh=w.height(); var tw=t.width(); var ww=w.width(); if(y + th + ay >=b&&y <=b + wh + ay&&x + tw + ax >=a&&x <=a + ww + ax){ if(!t.appeared) t.trigger('appear', settings.data); }else{ t.appeared=false; }}; var modifiedFn=function (){ t.appeared=true; if(settings.one){ w.unbind('scroll', check); var i=$.inArray(check, $.fn.appear.checks); if(i >=0) $.fn.appear.checks.splice(i, 1); } fn.apply(this, arguments); }; if(settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn); w.scroll(check); $.fn.appear.checks.push(check); (check)(); }); }; $.extend($.fn.appear, { checks: [], timeout: null, checkAll: function (){ var length=$.fn.appear.checks.length; if(length > 0) while (length--) ($.fn.appear.checks[length])(); }, run: function (){ if($.fn.appear.timeout) clearTimeout($.fn.appear.timeout); $.fn.appear.timeout=setTimeout($.fn.appear.checkAll, 20); }}); $.each(['append', 'prepend', 'after', 'before', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'remove', 'css', 'show', 'hide'], function (i, n){ var old=$.fn[n]; if(old){ $.fn[n]=function (){ var r=old.apply(this, arguments); $.fn.appear.run(); return r; }} }); })(jQuery); ;window.Modernizr=function (a, b, c){ function C(a){ j.cssText=a } function D(a, b){ return C(n.join(a + ";") + (b||"")) } function E(a, b){ return typeof a===b } function F(a, b){ return !!~("" + a).indexOf(b) } function G(a, b){ for (var d in a){ var e=a[d]; if(!F(e, "-")&&j[e]!==c)return b=="pfx" ? e:!0 } return !1 } function H(a, b, d){ for (var e in a){ var f=b[a[e]]; if(f!==c)return d===!1 ? a[e]:E(f, "function") ? f.bind(d||b):f } return !1 } function I(a, b, c){ var d=a.charAt(0).toUpperCase() + a.slice(1), e=(a + " " + p.join(d + " ") + d).split(" "); return E(b, "string")||E(b, "undefined") ? G(e, b):(e=(a + " " + q.join(d + " ") + d).split(" "), H(e, b, c)) } function J(){ e.input=function (c){ for (var d=0, e=c.length; d < e; d++)u[c[d]]=c[d] in k; return u.list&&(u.list = !!b.createElement("datalist")&&!!a.HTMLDataListElement), u }("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), e.inputtypes=function (a){ for (var d=0, e, f, h, i=a.length; d < i; d++)k.setAttribute("type", f=a[d]), e=k.type!=="text", e&&(k.value=l, k.style.cssText="position:absolute;visibility:hidden;", /^range$/.test(f)&&k.style.WebkitAppearance!==c ? (g.appendChild(k), h=b.defaultView, e=h.getComputedStyle&&h.getComputedStyle(k, null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0, g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f) ? e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)), t[a[d]] = !!e; return t }("search tel url email datetime date month week time datetime-local number range color".split(" ")) } var d="2.8.3", e={}, f = !0, g=b.documentElement, h="modernizr", i=b.createElement(h), j=i.style, k=b.createElement("input"), l=":)", m={}.toString, n=" -webkit- -moz- -o- -ms- ".split(" "), o="Webkit Moz O ms", p=o.split(" "), q=o.toLowerCase().split(" "), r={svg: "http://www.w3.org/2000/svg"}, s={}, t={}, u={}, v=[], w=v.slice, x, y=function (a, c, d, e){ var f, i, j, k, l=b.createElement("div"), m=b.body, n=m||b.createElement("body"); if(parseInt(d, 10))while (d--)j=b.createElement("div"), j.id=e ? e[d]:h + (d + 1), l.appendChild(j); return f=["­", '"].join(""), l.id=h, (m ? l:n).innerHTML +=f, n.appendChild(l), m||(n.style.background="", n.style.overflow="hidden", k=g.style.overflow, g.style.overflow="hidden", g.appendChild(n)), i=c(l, a), m ? l.parentNode.removeChild(l):(n.parentNode.removeChild(n), g.style.overflow=k), !!i }, z=function (){ function d(d, e){ e=e||b.createElement(a[d]||"div"), d="on" + d; var f=d in e; return f||(e.setAttribute||(e=b.createElement("div")), e.setAttribute&&e.removeAttribute&&(e.setAttribute(d, ""), f=E(e[d], "function"), E(e[d], "undefined")||(e[d]=c), e.removeAttribute(d))), e=null, f } var a={ select: "input", change: "input", submit: "form", reset: "form", error: "img", load: "img", abort: "img" }; return d }(), A={}.hasOwnProperty, B; !E(A, "undefined")&&!E(A.call, "undefined") ? B=function (a, b){ return A.call(a, b) }:B=function (a, b){ return b in a&&E(a.constructor.prototype[b], "undefined") }, Function.prototype.bind||(Function.prototype.bind=function (b){ var c=this; if(typeof c!="function")throw new TypeError; var d=w.call(arguments, 1), e=function (){ if(this instanceof e){ var a=function (){ }; a.prototype=c.prototype; var f=new a, g=c.apply(f, d.concat(w.call(arguments))); return Object(g)===g ? g:f } return c.apply(b, d.concat(w.call(arguments))) }; return e }), s.flexbox=function (){ return I("flexWrap") }, s.flexboxlegacy=function (){ return I("boxDirection") }, s.canvas=function (){ var a=b.createElement("canvas"); return !!a.getContext&&!!a.getContext("2d") }, s.canvastext=function (){ return !!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText, "function") }, s.touch=function (){ var c; return "ontouchstart" in a||a.DocumentTouch&&b instanceof DocumentTouch ? c = !0:y(["@media (", n.join("touch-enabled),("), h, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function (a){ c=a.offsetTop===9 }), c }, s.hashchange=function (){ return z("hashchange", a)&&(b.documentMode===c||b.documentMode > 7) }, s.history=function (){ return !!a.history&&!!history.pushState }, s.draganddrop=function (){ var a=b.createElement("div"); return "draggable" in a||"ondragstart" in a&&"ondrop" in a }, s.rgba=function (){ return C("background-color:rgba(150,255,150,.5)"), F(j.backgroundColor, "rgba") }, s.hsla=function (){ return C("background-color:hsla(120,40%,100%,.5)"), F(j.backgroundColor, "rgba")||F(j.backgroundColor, "hsla") }, s.multiplebgs=function (){ return C("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(j.background) }, s.backgroundsize=function (){ return I("backgroundSize") }, s.borderimage=function (){ return I("borderImage") }, s.borderradius=function (){ return I("borderRadius") }, s.boxshadow=function (){ return I("boxShadow") }, s.textshadow=function (){ return b.createElement("div").style.textShadow==="" }, s.opacity=function (){ return D("opacity:.55"), /^0.55$/.test(j.opacity) }, s.cssanimations=function (){ return I("animationName") }, s.csscolumns=function (){ return I("columnCount") }, s.cssgradients=function (){ var a="background-image:", b="gradient(linear,left top,right bottom,from(#9f9),to(white));", c="linear-gradient(left top,#9f9, white);"; return C((a + "-webkit- ".split(" ").join(b + a) + n.join(c + a)).slice(0, -a.length)), F(j.backgroundImage, "gradient") }, s.cssreflections=function (){ return I("boxReflect") }, s.csstransforms=function (){ return !!I("transform") }, s.csstransforms3d=function (){ var a = !!I("perspective"); return a&&"webkitPerspective" in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function (b, c){ a=b.offsetLeft===9&&b.offsetHeight===3 }), a }, s.csstransitions=function (){ return I("transition") }, s.fontface=function (){ var a; return y('@font-face {font-family:"font";src:url("https://")}', function (c, d){ var e=b.getElementById("smodernizr"), f=e.sheet||e.styleSheet, g=f ? f.cssRules&&f.cssRules[0] ? f.cssRules[0].cssText:f.cssText||"":""; a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0 }), a }, s.generatedcontent=function (){ var a; return y(["#", h, "{font:0/0 a}#", h, ':after{content:"', l, '";visibility:hidden;font:3px/1 a}'].join(""), function (b){ a=b.offsetHeight >=3 }), a }, s.video=function (){ var a=b.createElement("video"), c = !1; try { if(c = !!a.canPlayType)c=new Boolean(c), c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "") } catch (d){ } return c }, s.audio=function (){ var a=b.createElement("audio"), c = !1; try { if(c = !!a.canPlayType)c=new Boolean(c), c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/, ""), c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/, "") } catch (d){ } return c }, s.svg=function (){ return !!b.createElementNS&&!!b.createElementNS(r.svg, "svg").createSVGRect }, s.inlinesvg=function (){ var a=b.createElement("div"); return a.innerHTML="", (a.firstChild&&a.firstChild.namespaceURI)==r.svg }, s.svgclippaths=function (){ return !!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg, "clipPath"))) }; for (var K in s)B(s, K)&&(x=K.toLowerCase(), e[x]=s[K](), v.push((e[x] ? "":"no-") + x)); return e.input||J(), e.addTest=function (a, b){ if(typeof a=="object")for (var d in a)B(a, d)&&e.addTest(d, a[d]); else { a=a.toLowerCase(); if(e[a]!==c)return e; b=typeof b=="function" ? b():b, typeof f!="undefined"&&f && (g.className +=" " + (b ? "":"no-") + a), e[a]=b } return e }, C(""), i=k = null, function (a, b){ function l(a, b){ var c=a.createElement("p"), d=a.getElementsByTagName("head")[0]||a.documentElement; return c.innerHTML="x", d.insertBefore(c.lastChild, d.firstChild) } function m(){ var a=s.elements; return typeof a=="string" ? a.split(" "):a } function n(a){ var b=j[a[h]]; return b||(b={}, i++, a[h]=i, j[i]=b), b } function o(a, c, d){ c||(c=b); if(k)return c.createElement(a); d||(d=n(c)); var g; return d.cache[a] ? g=d.cache[a].cloneNode():f.test(a) ? g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a), g.canHaveChildren&&!e.test(a)&&!g.tagUrn ? d.frag.appendChild(g):g } function p(a, c){ a||(a=b); if(k)return a.createDocumentFragment(); c=c||n(a); var d=c.frag.cloneNode(), e=0, f=m(), g=f.length; for (; e < g; e++)d.createElement(f[e]); return d } function q(a, b){ b.cache||(b.cache={}, b.createElem=a.createElement, b.createFrag=a.createDocumentFragment, b.frag=b.createFrag()), a.createElement=function (c){ return s.shivMethods ? o(c, a, b):b.createElem(c) }, a.createDocumentFragment=Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function (a){ return b.createElem(a), b.frag.createElement(a), 'c("' + a + '")' }) + ");return n}")(s, b.frag) } function r(a){ a||(a=b); var c=n(a); return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS = !!l(a, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k||q(a, c), a } var c="3.7.0", d=a.html5||{}, e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, g, h="_html5shiv", i=0, j={}, k; (function (){ try { var a=b.createElement("a"); a.innerHTML="", g="hidden" in a, k=a.childNodes.length==1||function (){ b.createElement("a"); var a=b.createDocumentFragment(); return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined" }() } catch (c){ g = !0, k = !0 }})(); var s={ elements: d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video", version: c, shivCSS: d.shivCSS!==!1, supportsUnknownElements: k, shivMethods: d.shivMethods!==!1, type: "default", shivDocument: r, createElement: o, createDocumentFragment: p }; a.html5=s, r(b) }(this, b), e._version=d, e._prefixes=n, e._domPrefixes=q, e._cssomPrefixes=p, e.hasEvent=z, e.testProp=function (a){ return G([a]) }, e.testAllProps=I, e.testStyles=y, g.className=g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + v.join(" "):""), e }(this, this.document), function (a, b, c){ function d(a){ return "[object Function]"==o.call(a) } function e(a){ return "string"==typeof a } function f(){ } function g(a){ return !a||"loaded"==a||"complete"==a||"uninitialized"==a } function h(){ var a=p.shift(); q=1, a ? a.t ? m(function (){ ("c"==a.t ? B.injectCss:B.injectJs)(a.s, 0, a.a, a.x, a.e, 1) }, 0):(a(), h()):q=0 } function i(a, c, d, e, f, i, j){ function k(b){ if(!o&&g(l.readyState)&&(u.r=o = 1, !q&&h(), l.onload=l.onreadystatechange=null, b)){ "img"!=a&&m(function (){ t.removeChild(l) }, 50); for (var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload() }} var j=j||B.errorTimeout, l=b.createElement(a), o=0, r=0, u={t: d, s: c, e: f, a: i, x: j}; 1===y[c]&&(r=1, y[c]=[]), "object"==a ? l.data=c:(l.src=c, l.type=a), l.width=l.height="0", l.onerror=l.onload=l.onreadystatechange=function (){ k.call(this, r) }, p.splice(e, 0, u), "img"!=a&&(r||2===y[c] ? (t.insertBefore(l, s ? null:n), m(k, j)):y[c].push(l)) } function j(a, b, c, d, f){ return q=0, b=b||"j", e(a) ? i("c"==b ? v:u, a, b, this.i++, c, d, f):(p.splice(this.i++, 0, a), 1==p.length&&h()), this } function k(){ var a=B; return a.loader={load: j, i: 0}, a } var l=b.documentElement, m=a.setTimeout, n=b.getElementsByTagName("script")[0], o={}.toString, p=[], q=0, r="MozAppearance" in l.style, s=r&&!!b.createRange().compareNode, t=s ? l:n.parentNode, l=a.opera&&"[object Opera]"==o.call(a.opera), l = !!b.attachEvent&&!l, u=r ? "object":l ? "script":"img", v=l ? "script":u, w=Array.isArray||function (a){ return "[object Array]"==o.call(a) }, x=[], y={}, z={ timeout: function (a, b){ return b.length&&(a.timeout=b[0]), a }}, A, B; B=function (a){ function b(a){ var a=a.split("!"), b=x.length, c=a.pop(), d=a.length, c={ url: c, origUrl: c, prefixes: a }, e, f, g; for (f=0; f < d; f++)g=a[f].split("="), (e=z[g.shift()])&&(c=e(c, g)); for (f=0; f < b; f++)c=x[f](c); return c } function g(a, e, f, g, h){ var i=b(a), j=i.autoCallback; i.url.split(".").pop().split("?").shift(), i.bypass||(e&&(e=d(e) ? e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]), i.instead ? i.instead(a, e, f, g, h):(y[i.url] ? i.noexec = !0:y[i.url]=1, f.load(i.url, i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift() ? "c":c, i.noexec, i.attrs, i.timeout), (d(e)||d(j))&&f.load(function (){ k(), e&&e(i.origUrl, h, g), j&&j(i.origUrl, h, g), y[i.url]=2 }))) } function h(a, b){ function c(a, c){ if(a){ if(e(a))c||(j=function (){ var a=[].slice.call(arguments); k.apply(this, a), l() }), g(a, j, b, 0, h); else if(Object(a)===a)for (n in m=function (){ var b=0, c; for (c in a)a.hasOwnProperty(c)&&b++; return b }(), a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j) ? j=function (){ var a=[].slice.call(arguments); k.apply(this, a), l() }:j[n]=function (a){ return function (){ var b=[].slice.call(arguments); a&&a.apply(this, b), l() }}(k[n])), g(a[n], j, b, n, h)) } else!c&&l() } var h = !!a.test, i=a.load||a.both, j=a.callback||f, k=j, l=a.complete||f, m, n; c(h ? a.yep:a.nope, !!i), i&&c(i) } var i, j, l=this.yepnope.loader; if(e(a))g(a, 0, l, 0); else if(w(a))for (i=0; i < a.length; i++)j=a[i], e(j) ? g(j, 0, l, 0):w(j) ? B(j):Object(j)===j&&h(j, l); else Object(a)===a&&h(a, l) }, B.addPrefix=function (a, b){ z[a]=b }, B.addFilter=function (a){ x.push(a) }, B.errorTimeout=1e4, null==b.readyState&&b.addEventListener&&(b.readyState="loading", b.addEventListener("DOMContentLoaded", A=function (){ b.removeEventListener("DOMContentLoaded", A, 0), b.readyState="complete" }, 0)), a.yepnope=k(), a.yepnope.executeStack=h, a.yepnope.injectJs=function (a, c, d, e, i, j){ var k=b.createElement("script"), l, o, e=e||B.errorTimeout; k.src=a; for (o in d)k.setAttribute(o, d[o]); c=j ? h:c||f, k.onreadystatechange=k.onload=function (){ !l&&g(k.readyState)&&(l=1, c(), k.onload=k.onreadystatechange=null) }, m(function (){ l||(l=1, c(1)) }, e), i ? k.onload():n.parentNode.insertBefore(k, n) }, a.yepnope.injectCss=function (a, c, d, e, g, i){ var e=b.createElement("link"), j, c=i ? h:c||f; e.href=a, e.rel="stylesheet", e.type="text/css"; for (j in d)e.setAttribute(j, d[j]); g||(n.parentNode.insertBefore(e, n), m(c, 0)) }}(this, document), Modernizr.load=function (){ yepnope.apply(window, [].slice.call(arguments, 0)) }; !function(a){a.fn.hoverIntent=function(e,t,n){var o,r,v,i,u={interval:100,sensitivity:6,timeout:0};u="object"==typeof e?a.extend(u,e):a.isFunction(t)?a.extend(u,{over:e,out:t,selector:n}):a.extend(u,{over:e,out:e,selector:t});function s(e){o=e.pageX,r=e.pageY}function h(e){var t=a.extend({},e),n=this;n.hoverIntent_t&&(n.hoverIntent_t=clearTimeout(n.hoverIntent_t)),"mouseenter"===e.type?(v=t.pageX,i=t.pageY,a(n).on("mousemove.hoverIntent",s),n.hoverIntent_s||(n.hoverIntent_t=setTimeout(function(){I(t,n)},u.interval))):(a(n).off("mousemove.hoverIntent",s),n.hoverIntent_s&&(n.hoverIntent_t=setTimeout(function(){!function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,u.out.apply(t,[e])}(t,n)},u.timeout)))}var I=function(e,t){if(t.hoverIntent_t=clearTimeout(t.hoverIntent_t),Math.sqrt((v-o)*(v-o)+(i-r)*(i-r)) -1; }, _attach: function (elem, options){ elem=$(elem); if(elem.hasClass(this._getMarker())){ return; } elem.addClass(this._getMarker()); options=$.extend({}, this.defaultOptions, this._getMetadata(elem), options||{}); var inst=$.extend({name: this.name, elem: elem, options: options}, this._instSettings(elem, options)); elem.data(this.name, inst); this._postAttach(elem, inst); this.option(elem, options); }, _instSettings: function (elem, options){ return {};}, _postAttach: function (elem, inst){ }, _getMetadata: function (elem){ try { var data=elem.data(this.name.toLowerCase())||''; data=data.replace(/'/g, '"'); data=data.replace(/([a-zA-Z0-9]+):/g, function (match, group, i){ var count=data.substring(0, i).match(/"/g); return (!count||count.length % 2===0 ? '"' + group + '":':group + ':'); }); data=$.parseJSON('{' + data + '}'); for (var name in data){ var value=data[name]; if(typeof value==='string'&&value.match(/^new Date\((.*)\)$/)){ data[name]=eval(value); }} return data; } catch (e){ return {};}}, _getInst: function (elem){ return $(elem).data(this.name)||{};}, option: function (elem, name, value){ elem=$(elem); var inst=elem.data(this.name); if(!name||(typeof name==='string'&&value==null)){ var options=(inst||{}).options; return (options&&name ? options[name]:options); } if(!elem.hasClass(this._getMarker())){ return; } var options=name||{}; if(typeof name==='string'){ options={}; options[name]=value; } this._optionsChanged(elem, inst, options); $.extend(inst.options, options); }, _optionsChanged: function (elem, inst, options){ }, destroy: function (elem){ elem=$(elem); if(!elem.hasClass(this._getMarker())){ return; } this._preDestroy(elem, this._getInst(elem)); elem.removeData(this.name).removeClass(this._getMarker()); }, _preDestroy: function (elem, inst){ }}); function camelCase(name){ return name.replace(/-([a-z])/g, function (match, group){ return group.toUpperCase(); }); } $.JQPlugin={ createPlugin: function (superClass, overrides){ if(typeof superClass==='object'){ overrides=superClass; superClass='JQPlugin'; } superClass=camelCase(superClass); var className=camelCase(overrides.name); JQClass.classes[className]=JQClass.classes[superClass].extend(overrides); new JQClass.classes[className](); }};})(jQuery); !function (a, b, c, d){ function e(b, c){ this.settings=null, this.options=a.extend({}, e.Defaults, c), this.$element=a(b), this._handlers={}, this._plugins={}, this._supress={}, this._current=null, this._speed=null, this._coordinates=[], this._breakpoint=null, this._width=null, this._items=[], this._clones=[], this._mergers=[], this._widths=[], this._invalidated={}, this._pipe=[], this._drag={ time: null, target: null, pointer: null, stage: {start: null, current: null}, direction: null }, this._states={ current: {}, tags: {initializing: ["busy"], animating: ["busy"], dragging: ["interacting"]}}, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c){ this._handlers[c]=a.proxy(this[c], this) }, this)), a.each(e.Plugins, a.proxy(function (a, b){ this._plugins[a.charAt(0).toLowerCase() + a.slice(1)]=new b(this) }, this)), a.each(e.Workers, a.proxy(function (b, c){ this._pipe.push({filter: c.filter, run: a.proxy(c.run, this)}) }, this)), this.setup(), this.initialize() } e.Defaults={ items: 3, loop: !1, center: !1, rewind: !1, mouseDrag: !0, touchDrag: !0, pullDrag: !0, freeDrag: !1, margin: 0, stagePadding: 0, merge: !1, mergeFit: !0, autoWidth: !1, startPosition: 0, rtl: !1, smartSpeed: 250, fluidSpeed: !1, dragEndSpeed: !1, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: b, fallbackEasing: "swing", info: !1, nestedItemSelector: !1, itemElement: "div", stageElement: "div", refreshClass: "owl-refresh", loadedClass: "owl-loaded", loadingClass: "owl-loading", rtlClass: "owl-rtl", responsiveClass: "owl-responsive", dragClass: "owl-drag", itemClass: "owl-item", stageClass: "owl-stage", stageOuterClass: "owl-stage-outer", grabClass: "owl-grab" }, e.Width={Default: "default", Inner: "inner", Outer: "outer"}, e.Type={ Event: "event", State: "state" }, e.Plugins={}, e.Workers=[{ filter: ["width", "settings"], run: function (){ this._width=this.$element.width() }}, { filter: ["width", "items", "settings"], run: function (a){ a.current=this._items&&this._items[this.relative(this._current)] }}, { filter: ["items", "settings"], run: function (){ this.$stage.children(".cloned").remove() }}, { filter: ["width", "items", "settings"], run: function (a){ var b=this.settings.margin||"", c = !this.settings.autoWidth, d=this.settings.rtl, e={ width: "auto", "margin-left": d ? b:"", "margin-right": d ? "":b }; !c&&this.$stage.children().css(e), a.css=e }}, { filter: ["width", "items", "settings"], run: function (a){ var b=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, c=null, d=this._items.length, e = !this.settings.autoWidth, f=[]; for (a.items={ merge: !1, width: b }; d--;)c=this._mergers[d], c=this.settings.mergeFit&&Math.min(c, this.settings.items)||c, a.items.merge=c > 1||a.items.merge, f[d]=e ? b * c:this._items[d].width(); this._widths=f }}, { filter: ["items", "settings"], run: function (){ var b=[], c=this._items, d=this.settings, e=Math.max(2 * d.items, 4), f=2 * Math.ceil(c.length / 2), g=d.loop&&c.length ? d.rewind ? e:Math.max(e, f):0, h="", i=""; for (g /=2; g--;)b.push(this.normalize(b.length / 2, !0)), h +=c[b[b.length - 1]][0].outerHTML, b.push(this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i=c[b[b.length - 1]][0].outerHTML + i; this._clones=b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(this.$stage) }}, { filter: ["width", "items", "settings"], run: function (){ for (var a=this.settings.rtl ? 1:-1, b=this._clones.length + this._items.length, c=-1, d=0, e=0, f=[]; ++c < b;)d=f[c - 1]||0, e=this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a); this._coordinates=f }}, { filter: ["width", "items", "settings"], run: function (){ var a=this.settings.stagePadding, b=this._coordinates, c={ width: Math.ceil(Math.abs(b[b.length - 1])) + 2 * a, "padding-left": a||"", "padding-right": a||"" }; this.$stage.css(c) }}, { filter: ["width", "items", "settings"], run: function (a){ var b=this._coordinates.length, c = !this.settings.autoWidth, d=this.$stage.children(); if(c&&a.items.merge)for (; b--;)a.css.width=this._widths[this.relative(b)], d.eq(b).css(a.css); else c&&(a.css.width=a.items.width, d.css(a.css)) }}, { filter: ["items"], run: function (){ this._coordinates.length < 1&&this.$stage.removeAttr("style") }}, { filter: ["width", "items", "settings"], run: function (a){ a.current=a.current ? this.$stage.children().index(a.current):0, a.current=Math.max(this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current) }}, { filter: ["position"], run: function (){ this.animate(this.coordinates(this._current)) }}, { filter: ["width", "position", "items", "settings"], run: function (){ var a, b, c, d, e=this.settings.rtl ? 1:-1, f=2 * this.settings.stagePadding, g=this.coordinates(this.current()) + f, h=g + this.width() * e, i=[]; for (c=0, d=this._coordinates.length; c < d; c++)a=this._coordinates[c - 1]||0, b=Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g)&&this.op(a, ">", h)||this.op(b, "<", g)&&this.op(b, ">", h))&&i.push(c); this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass("active"), this.settings.center&&(this.$stage.children(".center").removeClass("center"), this.$stage.children().eq(this.current()).addClass("center")) }}], e.prototype.initialize=function (){ if(this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth&&!this.is("pre-loading")){ var b, c, e; b=this.$element.find("img"), c=this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector:d, e=this.$element.children(c).width(), b.length&&e <=0&&this.preloadAutoWidthImages(b) } this.$element.addClass(this.options.loadingClass), this.$stage=a("<" + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>').wrap('
      '), this.$element.append(this.$stage.parent()), this.replace(this.$element.children().not(this.$stage.parent())), this.$element.is(":visible") ? this.refresh():this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized") }, e.prototype.setup=function (){ var b=this.viewport(), c=this.options.responsive, d=-1, e=null; c ? (a.each(c, function (a){ a <=b&&a > d&&(d=Number(a)) }), e=a.extend({}, this.options, c[d]), "function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()), delete e.responsive, e.responsiveClass&&this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + d))):e=a.extend({}, this.options), this.trigger("change", { property: { name: "settings", value: e }}), this._breakpoint=d, this.settings=e, this.invalidate("settings"), this.trigger("changed", { property: { name: "settings", value: this.settings }}) }, e.prototype.optionsLogic=function (){ this.settings.autoWidth&&(this.settings.stagePadding = !1, this.settings.merge = !1) }, e.prototype.prepare=function (b){ var c=this.trigger("prepare", {content: b}); return c.data||(c.data=a("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(b)), this.trigger("prepared", {content: c.data}), c.data }, e.prototype.update=function (){ for (var b=0, c=this._pipe.length, d=a.proxy(function (a){ return this[a] }, this._invalidated), e={}; b < c;)(this._invalidated.all||a.grep(this._pipe[b].filter, d).length > 0)&&this._pipe[b].run(e), b++; this._invalidated={}, !this.is("valid")&&this.enter("valid") }, e.prototype.width=function (a){ switch (a=a||e.Width.Default){ case e.Width.Inner: case e.Width.Outer: return this._width; default: return this._width - 2 * this.settings.stagePadding + this.settings.margin }}, e.prototype.refresh=function (){ this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed") }, e.prototype.onThrottledResize=function (){ b.clearTimeout(this.resizeTimer), this.resizeTimer=b.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate) }, e.prototype.onResize=function (){ return !!this._items.length&&(this._width!==this.$element.width()&&(!!this.$element.is(":visible")&&(this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1):(this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized"))))) }, e.prototype.registerEventHandlers=function (){ a.support.transition&&this.$stage.on(a.support.transition.end + ".owl.core", a.proxy(this.onTransitionEnd, this)), this.settings.responsive!==!1&&this.on(b, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function (){ return !1 })), this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core", a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this))) }, e.prototype.onDragStart=function (b){ var d=null; 3!==b.which&&(a.support.transform ? (d=this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), d={ x: d[16===d.length ? 12:4], y: d[16===d.length ? 13:5] }):(d=this.$stage.position(), d={ x: this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin:d.left, y: d.top }), this.is("animating")&&(a.support.transform ? this.animate(d.x):this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown"===b.type), this.speed(0), this._drag.time=(new Date).getTime(), this._drag.target=a(b.target), this._drag.stage.start=d, this._drag.stage.current=d, this._drag.pointer=this.pointer(b), a(c).on("mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one("mousemove.owl.core touchmove.owl.core", a.proxy(function (b){ var d=this.difference(this._drag.pointer, this.pointer(b)); a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) < Math.abs(d.y)&&this.is("valid")||(b.preventDefault(), this.enter("dragging"), this.trigger("drag")) }, this))) }, e.prototype.onDragMove=function (a){ var b=null, c=null, d=null, e=this.difference(this._drag.pointer, this.pointer(a)), f=this.difference(this._drag.stage.start, e); this.is("dragging")&&(a.preventDefault(), this.settings.loop ? (b=this.coordinates(this.minimum()), c=this.coordinates(this.maximum() + 1) - b, f.x=((f.x - b) % c + c) % c + b):(b=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()), c=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()), d=this.settings.pullDrag ? -1 * e.x / 5:0, f.x=Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current=f, this.animate(f.x)) }, e.prototype.onDragEnd=function (b){ var d=this.difference(this._drag.pointer, this.pointer(b)), e=this._drag.stage.current, f=d.x > 0 ^ this.settings.rtl ? "left":"right"; a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed), this.current(this.closest(e.x, 0!==d.x ? f:this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction=f, (Math.abs(d.x) > 3||(new Date).getTime() - this._drag.time > 300)&&this._drag.target.one("click.owl.core", function (){ return !1 })), this.is("dragging")&&(this.leave("dragging"), this.trigger("dragged")) }, e.prototype.closest=function (b, c){ var d=-1, e=30, f=this.width(), g=this.coordinates(); return this.settings.freeDrag||a.each(g, a.proxy(function (a, h){ return "left"===c&&b > h - e&&b < h + e ? d=a:"right"===c&&b > h - f - e&&b < h - f + e ? d=a + 1:this.op(b, "<", h)&&this.op(b, ">", g[a + 1]||h - f)&&(d="left"===c ? a + 1:a), d===-1 }, this)), this.settings.loop||(this.op(b, ">", g[this.minimum()]) ? d=b = this.minimum():this.op(b, "<", g[this.maximum()])&&(d=b = this.maximum())), d }, e.prototype.animate=function (b){ var c=this.speed() > 0; this.is("animating")&&this.onTransitionEnd(), c&&(this.enter("animating"), this.trigger("translate")), a.support.transform3d&&a.support.transition ? this.$stage.css({ transform: "translate3d(" + b + "px,0px,0px)", transition: this.speed() / 1e3 + "s" }):c ? this.$stage.animate({left: b + "px"}, this.speed(), this.settings.fallbackEasing, a.proxy(this.onTransitionEnd, this)):this.$stage.css({left: b + "px"}) }, e.prototype.is=function (a){ return this._states.current[a]&&this._states.current[a] > 0 }, e.prototype.current=function (a){ if(a===d)return this._current; if(0===this._items.length)return d; if(a=this.normalize(a), this._current!==a){ var b=this.trigger("change", {property: {name: "position", value: a}}); b.data!==d&&(a=this.normalize(b.data)), this._current=a, this.invalidate("position"), this.trigger("changed", { property: { name: "position", value: this._current }}) } return this._current }, e.prototype.invalidate=function (b){ return "string"===a.type(b)&&(this._invalidated[b] = !0, this.is("valid")&&this.leave("valid")), a.map(this._invalidated, function (a, b){ return b }) }, e.prototype.reset=function (a){ a=this.normalize(a), a!==d&&(this._speed=0, this._current=a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"])) }, e.prototype.normalize=function (a, b){ var c=this._items.length, e=b ? 0:this._clones.length; return !this.isNumeric(a)||c < 1 ? a=d:(a < 0||a >=c + e)&&(a=((a - e / 2) % c + c) % c + e / 2), a }, e.prototype.relative=function (a){ return a -=this._clones.length / 2, this.normalize(a, !0) }, e.prototype.maximum=function (a){ var b, c, d, e=this.settings, f=this._coordinates.length; if(e.loop)f=this._clones.length / 2 + this._items.length - 1; else if(e.autoWidth||e.merge){ for (b=this._items.length, c=this._items[--b].width(), d=this.$element.width(); b--&&(c +=this._items[b].width() + this.settings.margin, !(c > d));); f=b + 1 } else f=e.center ? this._items.length - 1:this._items.length - e.items; return a&&(f -=this._clones.length / 2), Math.max(f, 0) }, e.prototype.minimum=function (a){ return a ? 0:this._clones.length / 2 }, e.prototype.items=function (a){ return a===d ? this._items.slice():(a=this.normalize(a, !0), this._items[a]) }, e.prototype.mergers=function (a){ return a===d ? this._mergers.slice():(a=this.normalize(a, !0), this._mergers[a]) }, e.prototype.clones=function (b){ var c=this._clones.length / 2, e=c + this._items.length, f=function (a){ return a % 2===0 ? e + a / 2:c - (a + 1) / 2 }; return b===d ? a.map(this._clones, function (a, b){ return f(b) }):a.map(this._clones, function (a, c){ return a===b ? f(c):null }) }, e.prototype.speed=function (a){ return a!==d&&(this._speed=a), this._speed }, e.prototype.coordinates=function (b){ var c, e=1, f=b - 1; return b===d ? a.map(this._coordinates, a.proxy(function (a, b){ return this.coordinates(b) }, this)):(this.settings.center ? (this.settings.rtl&&(e=-1, f=b + 1), c=this._coordinates[b], c +=(this.width() - c + (this._coordinates[f]||0)) / 2 * e):c=this._coordinates[f]||0, c=Math.ceil(c)) }, e.prototype.duration=function (a, b, c){ return 0===c ? 0:Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c||this.settings.smartSpeed) }, e.prototype.to=function (a, b){ var c=this.current(), d=null, e=a - this.relative(c), f=(e > 0) - (e < 0), g=this._items.length, h=this.minimum(), i=this.maximum(); this.settings.loop ? (!this.settings.rewind&&Math.abs(e) > g / 2&&(e +=f * -1 * g), a=c + e, d=((a - h) % g + g) % g + h, d!==a&&d - e <=i&&d - e > 0&&(c=d - e, a=d, this.reset(c))):this.settings.rewind ? (i +=1, a=(a % i + i) % i):a=Math.max(h, Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.$element.is(":visible")&&this.update() }, e.prototype.next=function (a){ a=a||!1, this.to(this.relative(this.current()) + 1, a) }, e.prototype.prev=function (a){ a=a||!1, this.to(this.relative(this.current()) - 1, a) }, e.prototype.onTransitionEnd=function (a){ if(a!==d&&(a.stopPropagation(), (a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return !1; this.leave("animating"), this.trigger("translated") }, e.prototype.viewport=function (){ var d; return this.options.responsiveBaseElement!==b ? d=a(this.options.responsiveBaseElement).width():b.innerWidth ? d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth ? d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."), d }, e.prototype.replace=function (b){ this.$stage.empty(), this._items=[], b&&(b=b instanceof jQuery ? b:a(b)), this.settings.nestedItemSelector&&(b=b.find("." + this.settings.nestedItemSelector)), b.filter(function (){ return 1===this.nodeType }).each(a.proxy(function (a, b){ b=this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1) }, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0), this.invalidate("items") }, e.prototype.add=function (b, c){ var e=this.relative(this._current); c=c===d ? this._items.length:this.normalize(c, !0), b=b instanceof jQuery ? b:a(b), this.trigger("add", { content: b, position: c }), b=this.prepare(b), 0===this._items.length||c===this._items.length ? (0===this._items.length&&this.$stage.append(b), 0!==this._items.length&&this._items[c - 1].after(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)), this._items[e]&&this.reset(this._items[e].index()), this.invalidate("items"), this.trigger("added", { content: b, position: c }) }, e.prototype.remove=function (a){ a=this.normalize(a, !0), a!==d&&(this.trigger("remove", { content: this._items[a], position: a }), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", { content: null, position: a })) }, e.prototype.preloadAutoWidthImages=function (b){ b.each(a.proxy(function (b, c){ this.enter("pre-loading"), c=a(c), a(new Image).one("load", a.proxy(function (a){ c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading")&&!this.is("initializing")&&this.refresh() }, this)).attr("src", c.attr("src")||c.attr("data-src")||c.attr("data-src-retina")) }, this)) }, e.prototype.destroy=function (){ this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize)); for (var d in this._plugins)this._plugins[d].destroy(); this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel") }, e.prototype.op=function (a, b, c){ var d=this.settings.rtl; switch (b){ case"<": return d ? a > c:a < c; case">": return d ? a < c:a > c; case">=": return d ? a <=c:a >=c; case"<=": return d ? a >=c:a <=c }}, e.prototype.on=function (a, b, c, d){ a.addEventListener ? a.addEventListener(b, c, d):a.attachEvent&&a.attachEvent("on" + b, c) }, e.prototype.off=function (a, b, c, d){ a.removeEventListener ? a.removeEventListener(b, c, d):a.detachEvent&&a.detachEvent("on" + b, c) }, e.prototype.trigger=function (b, c, d, f, g){ var h={ item: { count: this._items.length, index: this.current() }}, i=a.camelCase(a.grep(["on", b, d], function (a){ return a }).join("-").toLowerCase()), j=a.Event([b, "owl", d||"carousel"].join(".").toLowerCase(), a.extend({relatedTarget: this}, h, c)); return this._supress[b]||(a.each(this._plugins, function (a, b){ b.onTrigger&&b.onTrigger(j) }), this.register({ type: e.Type.Event, name: b }), this.$element.trigger(j), this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this, j)), j }, e.prototype.enter=function (b){ a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){ this._states.current[b]===d&&(this._states.current[b]=0), this._states.current[b]++ }, this)) }, e.prototype.leave=function (b){ a.each([b].concat(this._states.tags[b]||[]), a.proxy(function (a, b){ this._states.current[b]-- }, this)) }, e.prototype.register=function (b){ if(b.type===e.Type.Event){ if(a.event.special[b.name]||(a.event.special[b.name]={}), !a.event.special[b.name].owl){ var c=a.event.special[b.name]._default; a.event.special[b.name]._default=function (a){ return !c||!c.apply||a.namespace&&a.namespace.indexOf("owl")!==-1 ? a.namespace&&a.namespace.indexOf("owl") > -1:c.apply(this, arguments) }, a.event.special[b.name].owl = !0 }} else b.type===e.Type.State&&(this._states.tags[b.name] ? this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags, this._states.tags[b.name]=a.grep(this._states.tags[b.name], a.proxy(function (c, d){ return a.inArray(c, this._states.tags[b.name])===d }, this))) }, e.prototype.suppress=function (b){ a.each(b, a.proxy(function (a, b){ this._supress[b] = !0 }, this)) }, e.prototype.release=function (b){ a.each(b, a.proxy(function (a, b){ delete this._supress[b] }, this)) }, e.prototype.pointer=function (a){ var c={x: null, y: null}; return a=a.originalEvent||a || b.event, a=a.touches&&a.touches.length ? a.touches[0]:a.changedTouches&&a.changedTouches.length ? a.changedTouches[0]:a, a.pageX ? (c.x=a.pageX, c.y=a.pageY):(c.x=a.clientX, c.y=a.clientY), c }, e.prototype.isNumeric=function (a){ return !isNaN(parseFloat(a)) }, e.prototype.difference=function (a, b){ return {x: a.x - b.x, y: a.y - b.y}}, a.fn.owlCarousel=function (b){ var c=Array.prototype.slice.call(arguments, 1); return this.each(function (){ var d=a(this), f=d.data("owl.carousel"); f||(f=new e(this, "object"==typeof b&&b), d.data("owl.carousel", f), a.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c){ f.register({ type: e.Type.Event, name: c }), f.$element.on(c + ".owl.carousel.core", a.proxy(function (a){ a.namespace&&a.relatedTarget!==this&&(this.suppress([c]), f[c].apply(this, [].slice.call(arguments, 1)), this.release([c])) }, f)) })), "string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f, c) }) }, a.fn.owlCarousel.Constructor=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this._core=b, this._interval=null, this._visible=null, this._handlers={ "initialized.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.autoRefresh&&this.watch() }, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults={autoRefresh: !0, autoRefreshInterval: 500}, e.prototype.watch=function (){ this._interval||(this._visible=this._core.$element.is(":visible"), this._interval=b.setInterval(a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval)) }, e.prototype.refresh=function (){ this._core.$element.is(":visible")!==this._visible&&(this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible&&this._core.invalidate("width")&&this._core.refresh()) }, e.prototype.destroy=function (){ var a, c; b.clearInterval(this._interval); for (a in this._handlers)this._core.$element.off(a, this._handlers[a]); for (c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null) }, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this._core=b, this._loaded=[], this._handlers={ "initialized.owl.carousel change.owl.carousel resized.owl.carousel": a.proxy(function (b){ if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for (var c=this._core.settings, e=c.center&&Math.ceil(c.items / 2)||c.items, f=c.center&&e * -1||0, g=(b.property&&b.property.value!==d ? b.property.value:this._core.current()) + f, h=this._core.clones().length, i=a.proxy(function (a, b){ this.load(b) }, this); f++ < e;)this.load(h / 2 + this._core.relative(g)), h&&a.each(this._core.clones(this._core.relative(g)), i), g++ }, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults={lazyLoad: !1}, e.prototype.load=function (c){ var d=this._core.$stage.children().eq(c), e=d&&d.find(".owl-lazy"); !e||a.inArray(d.get(0), this._loaded) > -1||(e.each(a.proxy(function (c, d){ var e, f=a(d), g=b.devicePixelRatio > 1&&f.attr("data-src-retina")||f.attr("data-src"); this._core.trigger("load", { element: f, url: g }, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function (){ f.css("opacity", 1), this._core.trigger("loaded", {element: f, url: g}, "lazy") }, this)).attr("src", g):(e=new Image, e.onload=a.proxy(function (){ f.css({"background-image": 'url("' + g + '")', opacity: "1"}), this._core.trigger("loaded", { element: f, url: g }, "lazy") }, this), e.src=g) }, this)), this._loaded.push(d.get(0))) }, e.prototype.destroy=function (){ var a, b; for (a in this.handlers)this._core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null) }, a.fn.owlCarousel.Constructor.Plugins.Lazy=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this._core=b, this._handlers={ "initialized.owl.carousel refreshed.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.autoHeight&&this.update() }, this), "changed.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update() }, this), "loaded.owl.lazy": a.proxy(function (a){ a.namespace&&this._core.settings.autoHeight&&a.element.closest("." + this._core.settings.itemClass).index()===this._core.current()&&this.update() }, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) }; e.Defaults={autoHeight: !1, autoHeightClass: "owl-height"}, e.prototype.update=function (){ var b=this._core._current, c=b + this._core.settings.items, d=this._core.$stage.children().toArray().slice(b, c), e=[], f=0; a.each(d, function (b, c){ e.push(a(c).height()) }), f=Math.max.apply(null, e), this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass) }, e.prototype.destroy=function (){ var a, b; for (a in this._handlers)this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null) }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this._core=b, this._videos={}, this._playing=null, this._handlers={ "initialized.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.register({type: "state", name: "playing", tags: ["interacting"]}) }, this), "resize.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault() }, this), "refreshed.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove() }, this), "changed.owl.carousel": a.proxy(function (a){ a.namespace&&"position"===a.property.name&&this._playing&&this.stop() }, this), "prepared.owl.carousel": a.proxy(function (b){ if(b.namespace){ var c=a(b.content).find(".owl-video"); c.length&&(c.css("display", "none"), this.fetch(c, a(b.content))) }}, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function (a){ this.play(a) }, this)) }; e.Defaults={video: !1, videoHeight: !1, videoWidth: !1}, e.prototype.fetch=function (a, b){ var c=function (){ return a.attr("data-vimeo-id") ? "vimeo":a.attr("data-vzaar-id") ? "vzaar":"youtube" }(), d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"), e=a.attr("data-width")||this._core.settings.videoWidth, f=a.attr("data-height")||this._core.settings.videoHeight, g=a.attr("href"); if(!g)throw new Error("Missing video URL."); if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1)c="youtube"; else if(d[3].indexOf("vimeo") > -1)c="vimeo"; else { if(!(d[3].indexOf("vzaar") > -1))throw new Error("Video URL not supported."); c="vzaar" } d=d[6], this._videos[g]={ type: c, id: d, width: e, height: f }, b.attr("data-video", g), this.thumbnail(a, this._videos[g]) }, e.prototype.thumbnail=function (b, c){ var d, e, f, g=c.width&&c.height ? 'style="width:' + c.width + "px;height:" + c.height + 'px;"':"", h=b.find("img"), i="src", j="", k=this._core.settings, l=function (a){ e='
      ', d=k.lazyLoad ? '
      ':'
      ', b.after(d), b.after(e) }; if(b.wrap('
      "), this._core.settings.lazyLoad&&(i="data-src", j="owl-lazy"), h.length)return l(h.attr(i)), h.remove(), !1; "youtube"===c.type ? (f="//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)):"vimeo"===c.type ? a.ajax({ type: "GET", url: "//vimeo.com/api/v2/video/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a){ f=a[0].thumbnail_large, l(f) }}):"vzaar"===c.type&&a.ajax({ type: "GET", url: "//vzaar.com/api/videos/" + c.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (a){ f=a.framegrab_url, l(f) }}) }, e.prototype.stop=function (){ this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing=null, this._core.leave("playing"), this._core.trigger("stopped", null, "video") }, e.prototype.play=function (b){ var c, d=a(b.target), e=d.closest("." + this._core.settings.itemClass), f=this._videos[e.attr("data-video")], g=f.width||"100%", h=f.height||this._core.$stage.height(); this._playing||(this._core.enter("playing"), this._core.trigger("play", null, "video"), e=this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), "youtube"===f.type ? c='':"vimeo"===f.type ? c='':"vzaar"===f.type&&(c=''), a('
      ' + c + "
      ").insertAfter(e.find(".owl-video")), this._playing=e.addClass("owl-video-playing")) }, e.prototype.isInFullScreen=function (){ var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement; return b&&a(b).parent().hasClass("owl-video-frame") }, e.prototype.destroy=function (){ var a, b; this._core.$element.off("click.owl.video"); for (a in this._handlers)this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null) }, a.fn.owlCarousel.Constructor.Plugins.Video=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this.core=b, this.core.options=a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous=d, this.next=d, this.handlers={ "change.owl.carousel": a.proxy(function (a){ a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(), this.next=a.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function (a){ a.namespace&&(this.swapping="translated"==a.type) }, this), "translate.owl.carousel": a.proxy(function (a){ a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap() }, this) }, this.core.$element.on(this.handlers) }; e.Defaults={animateOut: !1, animateIn: !1}, e.prototype.swap=function (){ if(1===this.core.settings.items&&a.support.animation&&a.support.transition){ this.core.speed(0); var b, c=a.proxy(this.clear, this), d=this.core.$stage.children().eq(this.previous), e=this.core.$stage.children().eq(this.next), f=this.core.settings.animateIn, g=this.core.settings.animateOut; this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.one(a.support.animation.end, c).css({left: b + "px"}).addClass("animated owl-animated-out").addClass(g)), f&&e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f)) }}, e.prototype.clear=function (b){ a(b.target).css({left: ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() }, e.prototype.destroy=function (){ var a, b; for (a in this.handlers)this.core.$element.off(a, this.handlers[a]); for (b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null) }, a.fn.owlCarousel.Constructor.Plugins.Animate=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ var e=function (b){ this._core=b, this._timeout=null, this._paused = !1, this._handlers={ "changed.owl.carousel": a.proxy(function (a){ a.namespace&&"settings"===a.property.name ? this._core.settings.autoplay ? this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval() }, this), "initialized.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.autoplay&&this.play() }, this), "play.owl.autoplay": a.proxy(function (a, b, c){ a.namespace&&this.play(b, c) }, this), "stop.owl.autoplay": a.proxy(function (a){ a.namespace&&this.stop() }, this), "mouseover.owl.autoplay": a.proxy(function (){ this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause() }, this), "mouseleave.owl.autoplay": a.proxy(function (){ this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play() }, this), "touchstart.owl.core": a.proxy(function (){ this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause() }, this), "touchend.owl.core": a.proxy(function (){ this._core.settings.autoplayHoverPause&&this.play() }, this) }, this._core.$element.on(this._handlers), this._core.options=a.extend({}, e.Defaults, this._core.options) }; e.Defaults={ autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, e.prototype.play=function (a, b){ this._paused = !1, this._core.is("rotating")||(this._core.enter("rotating"), this._setAutoPlayInterval()) }, e.prototype._getNextTimeout=function (d, e){ return this._timeout&&b.clearTimeout(this._timeout), b.setTimeout(a.proxy(function (){ this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed) }, this), d||this._core.settings.autoplayTimeout) }, e.prototype._setAutoPlayInterval=function (){ this._timeout=this._getNextTimeout() }, e.prototype.stop=function (){ this._core.is("rotating")&&(b.clearTimeout(this._timeout), this._core.leave("rotating")) }, e.prototype.pause=function (){ this._core.is("rotating")&&(this._paused = !0) }, e.prototype.destroy=function (){ var a, b; this.stop(); for (a in this._handlers)this._core.$element.off(a, this._handlers[a]); for (b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null) }, a.fn.owlCarousel.Constructor.Plugins.autoplay=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ "use strict"; var e=function (b){ this._core=b, this._initialized = !1, this._pages=[], this._controls={}, this._templates=[], this.$element=this._core.$element, this._overrides={ next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers={ "prepared.owl.carousel": a.proxy(function (b){ b.namespace&&this._core.settings.dotsData&&this._templates.push('
      ' + a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "
      ") }, this), "added.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 0, this._templates.pop()) }, this), "remove.owl.carousel": a.proxy(function (a){ a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position, 1) }, this), "changed.owl.carousel": a.proxy(function (a){ a.namespace&&"position"==a.property.name&&this.draw() }, this), "initialized.owl.carousel": a.proxy(function (a){ a.namespace&&!this._initialized&&(this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation")) }, this), "refreshed.owl.carousel": a.proxy(function (a){ a.namespace&&this._initialized&&(this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) }, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers) }; e.Defaults={ nav: !1, navText: ["prev", "next"], navSpeed: !1, navElement: "div", navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotsData: !1, dotsSpeed: !1, dotsContainer: !1 }, e.prototype.initialize=function (){ var b, c=this._core.settings; this._controls.$relative=(c.navContainer ? a(c.navContainer):a("
      ").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous=a("<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click", a.proxy(function (a){ this.prev(c.navSpeed) }, this)), this._controls.$next=a("<" + c.navElement + ">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a){ this.next(c.navSpeed) }, this)), c.dotsData||(this._templates=[a("
      ").addClass(c.dotClass).append(a("")).prop("outerHTML")]), this._controls.$absolute=(c.dotsContainer ? a(c.dotsContainer):a("
      ").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "div", a.proxy(function (b){ var d=a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index():a(b.target).parent().index(); b.preventDefault(), this.to(d, c.dotsSpeed) }, this)); for (b in this._overrides)this._core[b]=a.proxy(this[b], this) }, e.prototype.destroy=function (){ var a, b, c, d; for (a in this._handlers)this.$element.off(a, this._handlers[a]); for (b in this._controls)this._controls[b].remove(); for (d in this.overides)this._core[d]=this._overrides[d]; for (c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null) }, e.prototype.update=function (){ var a, b, c, d=this._core.clones().length / 2, e=d + this._core.items().length, f=this._core.maximum(!0), g=this._core.settings, h=g.center||g.autoWidth||g.dotsData ? 1:g.dotsEach||g.items; if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy, g.items)), g.dots||"page"==g.slideBy)for (this._pages=[], a=d, b=0, c=0; a < e; a++){ if(b >=h||0===b){ if(this._pages.push({start: Math.min(f, a - d), end: a - d + h - 1}), Math.min(f, a - d)===f)break; b=0, ++c } b +=this._core.mergers(this._core.relative(a)) }}, e.prototype.draw=function (){ var b, c=this._core.settings, d=this._core.items().length <=c.items, e=this._core.relative(this._core.current()), f=c.loop||c.rewind; this._controls.$relative.toggleClass("disabled", !c.nav||d), c.nav&&(this._controls.$previous.toggleClass("disabled", !f&&e <=this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !f&&e >=this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !c.dots||d), c.dots&&(b=this._pages.length - this._controls.$absolute.children().length, c.dotsData&&0!==b ? this._controls.$absolute.html(this._templates.join("")):b > 0 ? this._controls.$absolute.append(new Array(b + 1).join(this._templates[0])):b < 0&&this._controls.$absolute.children().slice(b).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass("active")) }, e.prototype.onTrigger=function (b){ var c=this._core.settings; b.page={ index: a.inArray(this.current(), this._pages), count: this._pages.length, size: c&&(c.center||c.autoWidth||c.dotsData ? 1:c.dotsEach||c.items) }}, e.prototype.current=function (){ var b=this._core.relative(this._core.current()); return a.grep(this._pages, a.proxy(function (a, c){ return a.start <=b&&a.end >=b }, this)).pop() }, e.prototype.getPosition=function (b){ var c, d, e=this._core.settings; return "page"==e.slideBy ? (c=a.inArray(this.current(), this._pages), d=this._pages.length, b ? ++c:--c, c=this._pages[(c % d + d) % d].start):(c=this._core.relative(this._core.current()), d=this._core.items().length, b ? c +=e.slideBy:c -=e.slideBy), c }, e.prototype.next=function (b){ a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) }, e.prototype.prev=function (b){ a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) }, e.prototype.to=function (b, c, d){ var e; !d&&this._pages.length ? (e=this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c)):a.proxy(this._overrides.to, this._core)(b, c) }, a.fn.owlCarousel.Constructor.Plugins.Navigation=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ "use strict"; var e=function (c){ this._core=c, this._hashes={}, this.$element=this._core.$element, this._handlers={ "initialized.owl.carousel": a.proxy(function (c){ c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": a.proxy(function (b){ if(b.namespace){ var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); if(!c)return; this._hashes[c]=b.content }}, this), "changed.owl.carousel": a.proxy(function (c){ if(c.namespace&&"position"===c.property.name){ var d=this._core.items(this._core.relative(this._core.current())), e=a.map(this._hashes, function (a, b){ return a===d ? b:null }).join(); if(!e||b.location.hash.slice(1)===e)return; b.location.hash=e }}, this) }, this._core.options=a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function (a){ var c=b.location.hash.substring(1), e=this._core.$stage.children(), f=this._hashes[c]&&e.index(this._hashes[c]); f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f), !1, !0) }, this)) }; e.Defaults={URLhashListener: !1}, e.prototype.destroy=function (){ var c, d; a(b).off("hashchange.owl.navigation"); for (c in this._handlers)this._core.$element.off(c, this._handlers[c]); for (d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null) }, a.fn.owlCarousel.Constructor.Plugins.Hash=e }(window.Zepto||window.jQuery, window, document), function (a, b, c, d){ function e(b, c){ var e = !1, f=b.charAt(0).toUpperCase() + b.slice(1); return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b){ if(g[b]!==d)return e = !c||b, !1 }), e } function f(a){ return e(a, !0) } var g=a("").get(0).style, h="Webkit Moz O ms".split(" "), i={ transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" }}, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" }} }, j={ csstransforms: function (){ return !!e("transform") }, csstransforms3d: function (){ return !!e("perspective") }, csstransitions: function (){ return !!e("transition") }, cssanimations: function (){ return !!e("animation") }}; j.csstransitions()&&(a.support.transition=new String(f("transition")), a.support.transition.end=i.transition.end[a.support.transition]), j.cssanimations()&&(a.support.animation=new String(f("animation")), a.support.animation.end=i.animation.end[a.support.animation]), j.csstransforms()&&(a.support.transform=new String(f("transform")), a.support.transform3d=j.csstransforms3d()) }(window.Zepto||window.jQuery, window, document); !function (){ "use strict"; function t(o){ if(!o)throw new Error("No options passed to Waypoint constructor"); if(!o.element)throw new Error("No element option passed to Waypoint constructor"); if(!o.handler)throw new Error("No handler option passed to Waypoint constructor"); this.key="waypoint-" + e, this.options=t.Adapter.extend({}, t.defaults, o), this.element=this.options.element, this.adapter=new t.Adapter(this.element), this.callback=o.handler, this.axis=this.options.horizontal ? "horizontal":"vertical", this.enabled=this.options.enabled, this.triggerPoint=null, this.group=t.Group.findOrCreate({ name: this.options.group, axis: this.axis }), this.context=t.Context.findOrCreateByElement(this.options.context), t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]), this.group.add(this), this.context.add(this), i[this.key]=this, e +=1 } var e=0, i={}; t.prototype.queueTrigger=function (t){ this.group.queueTrigger(this, t) }, t.prototype.trigger=function (t){ this.enabled&&this.callback&&this.callback.apply(this, t) }, t.prototype.destroy=function (){ this.context.remove(this), this.group.remove(this), delete i[this.key] }, t.prototype.disable=function (){ return this.enabled = !1, this }, t.prototype.enable=function (){ return this.context.refresh(), this.enabled = !0, this }, t.prototype.next=function (){ return this.group.next(this) }, t.prototype.previous=function (){ return this.group.previous(this) }, t.invokeAll=function (t){ var e=[]; for (var o in i)e.push(i[o]); for (var n=0, r=e.length; r > n; n++)e[n][t]() }, t.destroyAll=function (){ t.invokeAll("destroy") }, t.disableAll=function (){ t.invokeAll("disable") }, t.enableAll=function (){ t.Context.refreshAll(); for (var e in i)i[e].enabled = !0; return this }, t.refreshAll=function (){ t.Context.refreshAll() }, t.viewportHeight=function (){ return window.innerHeight||document.documentElement.clientHeight }, t.viewportWidth=function (){ return document.documentElement.clientWidth }, t.adapters=[], t.defaults={ context: window, continuous: !0, enabled: !0, group: "default", horizontal: !1, offset: 0 }, t.offsetAliases={ "bottom-in-view": function (){ return this.context.innerHeight() - this.adapter.outerHeight() }, "right-in-view": function (){ return this.context.innerWidth() - this.adapter.outerWidth() }}, window.Waypoint=t }(), function (){ "use strict"; function t(t){ window.setTimeout(t, 1e3 / 60) } function e(t){ this.element=t, this.Adapter=n.Adapter, this.adapter=new this.Adapter(t), this.key="waypoint-context-" + i, this.didScroll = !1, this.didResize = !1, this.oldScroll={ x: this.adapter.scrollLeft(), y: this.adapter.scrollTop() }, this.waypoints={ vertical: {}, horizontal: {}}, t.waypointContextKey=this.key, o[t.waypointContextKey]=this, i +=1, n.windowContext||(n.windowContext = !0, n.windowContext=new e(window)), this.createThrottledScrollHandler(), this.createThrottledResizeHandler() } var i=0, o={}, n=window.Waypoint, r=window.onload; e.prototype.add=function (t){ var e=t.options.horizontal ? "horizontal":"vertical"; this.waypoints[e][t.key]=t, this.refresh() }, e.prototype.checkEmpty=function (){ var t=this.Adapter.isEmptyObject(this.waypoints.horizontal), e=this.Adapter.isEmptyObject(this.waypoints.vertical), i=this.element==this.element.window; t&&e && !i&&(this.adapter.off(".waypoints"), delete o[this.key]) }, e.prototype.createThrottledResizeHandler=function (){ function t(){ e.handleResize(), e.didResize = !1 } var e=this; this.adapter.on("resize.waypoints", function (){ e.didResize||(e.didResize = !0, n.requestAnimationFrame(t)) }) }, e.prototype.createThrottledScrollHandler=function (){ function t(){ e.handleScroll(), e.didScroll = !1 } var e=this; this.adapter.on("scroll.waypoints", function (){ (!e.didScroll||n.isTouch)&&(e.didScroll = !0, n.requestAnimationFrame(t)) }) }, e.prototype.handleResize=function (){ n.Context.refreshAll() }, e.prototype.handleScroll=function (){ var t={}, e={ horizontal: { newScroll: this.adapter.scrollLeft(), oldScroll: this.oldScroll.x, forward: "right", backward: "left" }, vertical: { newScroll: this.adapter.scrollTop(), oldScroll: this.oldScroll.y, forward: "down", backward: "up" }}; for (var i in e){ var o=e[i], n=o.newScroll > o.oldScroll, r=n ? o.forward:o.backward; for (var s in this.waypoints[i]){ var a=this.waypoints[i][s]; if(null!==a.triggerPoint){ var l=o.oldScroll < a.triggerPoint, h=o.newScroll >=a.triggerPoint, p=l&&h, u = !l&&!h; (p||u)&&(a.queueTrigger(r), t[a.group.id]=a.group) }} } for (var c in t)t[c].flushTriggers(); this.oldScroll={x: e.horizontal.newScroll, y: e.vertical.newScroll}}, e.prototype.innerHeight=function (){ return this.element==this.element.window ? n.viewportHeight():this.adapter.innerHeight() }, e.prototype.remove=function (t){ delete this.waypoints[t.axis][t.key], this.checkEmpty() }, e.prototype.innerWidth=function (){ return this.element==this.element.window ? n.viewportWidth():this.adapter.innerWidth() }, e.prototype.destroy=function (){ var t=[]; for (var e in this.waypoints)for (var i in this.waypoints[e])t.push(this.waypoints[e][i]); for (var o=0, n=t.length; n > o; o++)t[o].destroy() }, e.prototype.refresh=function (){ var t, e=this.element==this.element.window, i=e ? void 0:this.adapter.offset(), o={}; this.handleScroll(), t={ horizontal: { contextOffset: e ? 0:i.left, contextScroll: e ? 0:this.oldScroll.x, contextDimension: this.innerWidth(), oldScroll: this.oldScroll.x, forward: "right", backward: "left", offsetProp: "left" }, vertical: { contextOffset: e ? 0:i.top, contextScroll: e ? 0:this.oldScroll.y, contextDimension: this.innerHeight(), oldScroll: this.oldScroll.y, forward: "down", backward: "up", offsetProp: "top" }}; for (var r in t){ var s=t[r]; for (var a in this.waypoints[r]){ var l, h, p, u, c, d=this.waypoints[r][a], f=d.options.offset, w=d.triggerPoint, y=0, g=null==w; d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]), "function"==typeof f ? f=f.apply(d):"string"==typeof f&&(f=parseFloat(f), d.options.offset.indexOf("%") > -1&&(f=Math.ceil(s.contextDimension * f / 100))), l=s.contextScroll - s.contextOffset, d.triggerPoint=Math.floor(y + l - f), h=w < s.oldScroll, p=d.triggerPoint >=s.oldScroll, u=h&&p, c = !h&&!p, !g&&u ? (d.queueTrigger(s.backward), o[d.group.id]=d.group):!g&&c ? (d.queueTrigger(s.forward), o[d.group.id]=d.group):g&&s.oldScroll >=d.triggerPoint&&(d.queueTrigger(s.forward), o[d.group.id]=d.group) }} return n.requestAnimationFrame(function (){ for (var t in o)o[t].flushTriggers() }), this }, e.findOrCreateByElement=function (t){ return e.findByElement(t)||new e(t) }, e.refreshAll=function (){ for (var t in o)o[t].refresh() }, e.findByElement=function (t){ return o[t.waypointContextKey] }, window.onload=function (){ r&&r(), e.refreshAll() }, n.requestAnimationFrame=function (e){ var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t; i.call(window, e) }, n.Context=e }(), function (){ "use strict"; function t(t, e){ return t.triggerPoint - e.triggerPoint } function e(t, e){ return e.triggerPoint - t.triggerPoint } function i(t){ this.name=t.name, this.axis=t.axis, this.id=this.name + "-" + this.axis, this.waypoints=[], this.clearTriggerQueues(), o[this.axis][this.name]=this } var o={vertical: {}, horizontal: {}}, n=window.Waypoint; i.prototype.add=function (t){ this.waypoints.push(t) }, i.prototype.clearTriggerQueues=function (){ this.triggerQueues={up: [], down: [], left: [], right: []}}, i.prototype.flushTriggers=function (){ for (var i in this.triggerQueues){ var o=this.triggerQueues[i], n="up"===i||"left"===i; o.sort(n ? e:t); for (var r=0, s=o.length; s > r; r +=1){ var a=o[r]; (a.options.continuous||r===o.length - 1)&&a.trigger([i]) }} this.clearTriggerQueues() }, i.prototype.next=function (e){ this.waypoints.sort(t); var i=n.Adapter.inArray(e, this.waypoints), o=i===this.waypoints.length - 1; return o ? null:this.waypoints[i + 1] }, i.prototype.previous=function (e){ this.waypoints.sort(t); var i=n.Adapter.inArray(e, this.waypoints); return i ? this.waypoints[i - 1]:null }, i.prototype.queueTrigger=function (t, e){ this.triggerQueues[e].push(t) }, i.prototype.remove=function (t){ var e=n.Adapter.inArray(t, this.waypoints); e > -1&&this.waypoints.splice(e, 1) }, i.prototype.first=function (){ return this.waypoints[0] }, i.prototype.last=function (){ return this.waypoints[this.waypoints.length - 1] }, i.findOrCreate=function (t){ return o[t.axis][t.name]||new i(t) }, n.Group=i }(), function (){ "use strict"; function t(t){ this.$element=e(t) } var e=window.jQuery, i=window.Waypoint; e.each(["innerHeight", "innerWidth", "off", "offset", "on", "outerHeight", "outerWidth", "scrollLeft", "scrollTop"], function (e, i){ t.prototype[i]=function (){ var t=Array.prototype.slice.call(arguments); return this.$element[i].apply(this.$element, t) }}), e.each(["extend", "inArray", "isEmptyObject"], function (i, o){ t[o]=e[o] }), i.adapters.push({name: "jquery", Adapter: t}), i.Adapter=t }(), function (){ "use strict"; function t(t){ return function (){ var i=[], o=arguments[0]; return t.isFunction(arguments[0])&&(o=t.extend({}, arguments[1]), o.handler=arguments[0]), this.each(function (){ var n=t.extend({}, o, {element: this}); "string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]), i.push(new e(n)) }), i }} var e=window.Waypoint; window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)), window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto)) }(); !function (e, t){ "function"==typeof define&&define.amd ? define(t):"object"==typeof exports ? module.exports=t:e.fluidvids=t() }(this, function (){ "use strict"; function e(e){ return new RegExp("^(https?:)?//(?:" + d.players.join("|") + ").*$", "i").test(e) } function t(e, t){ return parseInt(e, 10) / parseInt(t, 10) * 100 + "%" } function i(i){ if((e(i.src)||e(i.data))&&!i.getAttribute("data-fluidvids")){ var n=document.createElement("div"); i.parentNode.insertBefore(n, i), i.className +=(i.className ? " ":"") + "fluidvids-item", i.setAttribute("data-fluidvids", "loaded"), n.className +="fluidvids", n.style.paddingTop=t(i.height, i.width), n.appendChild(i) }} function n(){ var e=document.createElement("div"); e.innerHTML="

      x

      ", r.appendChild(e.childNodes[1]) } var d={ selector: ["iframe", "object"], players: ["www.youtube.com", "player.vimeo.com"] }, o=[".fluidvids {", "width: 100%; max-width: 100%; position: relative;", "}", ".fluidvids-item {", "position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;", "}"].join(""), r=document.head||document.getElementsByTagName("head")[0]; return d.render=function (){ for (var e=document.querySelectorAll(d.selector.join()), t=e.length; t--;)i(e[t]) }, d.init=function (e){ for (var t in e)d[t]=e[t]; d.render(), n() }, d }); !function($){$.prettyPhoto={version:"3.1.6"};var options=$.prettyPhoto.options={hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
      \t\t\t\t\t\t
       
      \t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t
      \t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\tExpand \t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t\tnext \t\t\t\t\t\t\t\t\t\t\tprevious \t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t\t\tPrevious \t\t\t\t\t\t\t\t\t\t\t\t

      0/0

      \t\t\t\t\t\t\t\t\t\t\t\tNext \t\t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t\t\t

      \t\t\t\t\t\t\t\t\t\t\t
      {pp_social}
      \t\t\t\t\t\t\t\t\t\t\tClose \t\t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t
      \t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t\t
      \t\t\t\t\t\t
      \t\t\t\t\t
      \t\t\t\t\t
      ',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
      {content}
      ',custom_markup:"",social_tools:'